Help with IfWindowOpen

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
dutch_shenefield
Newbie
Posts: 2
Joined: Mon Apr 18, 2005 8:32 pm

Help with IfWindowOpen

Post by dutch_shenefield » Mon Apr 18, 2005 8:40 pm

I have a script that acts upon a program if the program window is open using the IfWindowOpen statement...not a problem. Now the software vendor is about to release a new version of this software that messes up my script. They are including the file name opened as the first part of the string of the window title ie; if no file open Untitled - Tattoo..... If a file is open the Untitled changes to the specific file name GMC - Tattoo....
I know you can add an asterick at the end of the program window name but what do you do if the first part of the name is constantly changing. I could do an IfWindowOpen for each possible combination but that seems a little tedious....and as possible files change will require constant modfiication.

Any idea of a better way to do this?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Apr 18, 2005 9:09 pm

Just do this:

IfWindowOpen>- Tatoo*

Read the documentation regarding how the asterisk works. The asterisk says "look for a match where the window title CONTAINS the preceeding text".
MJT Net Support
[email protected]

dutch_shenefield
Newbie
Posts: 2
Joined: Mon Apr 18, 2005 8:32 pm

Post by dutch_shenefield » Mon Apr 18, 2005 9:11 pm

support wrote:Just do this:

IfWindowOpen>- Tatoo*

Read the documentation regarding how the asterisk works. The asterisk says "look for a match where the window title CONTAINS the preceeding text".
Thanks

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