Windows with same name

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
conjure
Pro Scripter
Posts: 64
Joined: Thu Jan 12, 2012 3:05 pm

Windows with same name

Post by conjure » Wed Feb 24, 2016 11:58 am

Hi.I have 3 windows with the same name.
How is it possible to get the active's window position and then set new position for the active window?
Thank you for your advice..

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Windows with same name

Post by JRL » Wed Feb 24, 2016 1:46 pm

All windows have unique handles. GetActiveWindow> can retreive a window's handle rather than its name by setting the variable WIN_USEHANDLE to one.

Code: Select all

Let>WIN_USEHANDLE=1
GetActiveWindow>vTitle,Winx,WinY
MoveWindow>vTitle,20,20
Let>WIN_USEHANDLE=0

conjure
Pro Scripter
Posts: 64
Joined: Thu Jan 12, 2012 3:05 pm

Re: Windows with same name

Post by conjure » Wed Feb 24, 2016 2:35 pm

Thank you JRL.I ve never used handle before.Works great

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts