IfWindowOpen problems

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
edwardhalliwell
Newbie
Posts: 2
Joined: Fri Nov 13, 2009 3:43 pm

IfWindowOpen problems

Post by edwardhalliwell » Fri Nov 13, 2009 3:47 pm

I'm having a problem with some code and have used the debugger to narrow it down to my IfWindowOpen statement. When I run the debugger on the following code:
Label>BackHere
Wait>1
IfWindowOpen>Adobe*,BackHere
It always loops back to the BackHere label, and I haven't got a Window open containing Adobe.

What am I doing wrong? Is there something special about Adobe which means there's a Window Open I can't see?

To give background, I'm writing a script to run a sequence of Crystal Reports and print them to pdf. They take a variable amount of time to print so I want to use the above code to wait until it's printed before moving on.

Thanks

Edward

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

Post by Marcus Tettmar » Fri Nov 13, 2009 4:03 pm

This means you DO have a window open containing the text "adobe".

It may be hidden.

Open up the View System Windows tool: Tools/View System Windows. Type "adbobe" (without quotes) into the box and hit Find and it will show you the window on your system with that text in the caption.

You could try telling it to only find visible windows is set WF_TYPE to 2:

Let>WF_TYPE=2
IfWindowOpen>....
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

edwardhalliwell
Newbie
Posts: 2
Joined: Fri Nov 13, 2009 3:43 pm

Post by edwardhalliwell » Fri Nov 13, 2009 4:18 pm

Yes, you are (of course) absolutely spot on.

Thanks for such a quick and complete response.

Edward

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