I'm trying to streamline one of my scripts that wait for a process to complete
and refresh a window. I was looking at using WaitRectChanged in a loop.
But I can't figure out how to get the Rectangle coordinates I need for the command.
Thanks in advance for your help
Gil
Help with WaitRectChanged
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Yes. Make sure Relative is unchecked because WaitRectChanged uses absolute coordinates.Are you referring to the mouse coordinate box with the drop down on it? with Relative, follow cursor, Pixel Color
Position the cursor at the top left corner of where the rectangle begins, and read off the coordinates. Next position the cursor at the bottom right corner of the imaginary rectangle, and read off the coordinates again.From the Help File ......
WaitRectChanged>TLX,TLY,BRX,BRY,Timeout
This command causes Macro Scheduler to wait until the image bound by the specified pixel coordinates changes. If it doesn't change within the number of seconds specified in Timeout, the command stops waiting and the variable WRC_RESULT is set to FALSE. WRC_RESULT is TRUE if the command terminated because the image changed within the specified time. if Timeout is set to 0, the command will wait indefinitely.
TLX - Top Left corner X coordinate
TLY - Top Left corner Y coordinate
BRX - Bottom Right corner X coordinate
BRY - Bottom Right corner Y coordinate