View Single Post
  #3  
Old 02-25-2013, 09:33 AM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Here are a couple other approaches to finding SecureCRT's window position, in lieu of having a CRT object method or property: parse part of SecureCRT's Global.ini file, use AutoIT or similar third party application.

In the SecureCRT configuration folder you'll find a file named Global.ini. The following two lines in Global.ini show the last saved SecureCRT window position:
D:"X Position"=000000a9
D:"Y Position"=00000063

When you start SecureCRT, the X and Y positions will be accurate. If you start SecureCRT then move the window, it gets a little more complicated (still do-able). You'd need to save SecureCRT's settings to update the position within Global.ini before parsing out the variables/values needed. If you don't actually want to change settings you could backup the Global.ini to a different name, save SecureCRT settings, extract the X and Y position, then restore the Global.ini.

Alternatively, AutoIT and similar third party programs have functions which help you extract the window position. If you're comfortable installing a third party application, or already use AutoIT, then this approach may be worthwhile.
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote