View Single Post
  #2  
Old 02-20-2013, 07:12 PM
dluther dluther is offline
Registered User
 
Join Date: Feb 2013
Posts: 4
BTW, There are a couple of properties you can use to set the window location to open the IE object at a specific location:

Code:
g_objIE.left=800
g_objIE.top=200
I think I'm close to figuring a way to get the screen XY coordinates of the main window -- just a bit more research into the inner workings of Windows, but I think it may be around this code:

Code:
set objWMIService = GetObject( "winmgmts://./root/cimv2" )
set colItems = objWMIService.ExecQuery( "Select * from Win32_Process where Name='SecureCRT.exe'", , 48 )

i = 1
for each objItem in colItems
    pStr = pStr + (CStr(i) & ": " & objItem.Caption & vbTab & objItem.ExecutablePath & VbCrLf)
    i = i + 1

    j = 1
    for each objProperty in objItem.Properties_
      pStr = pStr + ("   " & CStr(j) & ": " & objProperty.Name & ": " & objProperty.Value & VbCrLf)
      j = j + 1
   next
next
' You can figure out what to do with "pStr"
Anyway, the "Handle" (and "ProcessID") should yield another object that I can query for the XY coordinates of the main SecureCRT window -- I just haven't found it. Yet.

From there, I should be able to adjust the coordinates to place the window somewhere inside the main window.
Reply With Quote