Specified Window Not Present

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Casweb
Newbie
Posts: 5
Joined: Thu Feb 16, 2006 9:40 am

Specified Window Not Present

Post by Casweb » Wed Mar 08, 2006 10:57 am

Hi all.
I use
SetFocus>Sometext*
to get the Focus of an Internet Explorer window.
Sometimes the name changes and I got an errormessage Specified Window "Sometext*" Not Present
Is it possible to avoid the message?

Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 08, 2006 11:55 am

Well you could do:


IfWindowOpen>Sometext*
SetFocus>Sometext*
Endif


But perhaps what you really want to do is find some other way to know what the title will be?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Thu Mar 09, 2006 2:31 pm

Possibly you should wait for the app to load, then immediately use

GetActiveWindow>CurrentWindow,x,y
msg>%CurrentWindow%

will get the window name...the message box wil show the name to you.

Casweb
Newbie
Posts: 5
Joined: Thu Feb 16, 2006 9:40 am

Post by Casweb » Thu Mar 09, 2006 3:41 pm

Ok, thanks for the answers.
I didn´t know that it is easy like this: IfWindowOpen>
:wink:

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