Can anyone see a problem with code, the WaitRecChange is timing out,
the field I'm waiting on normally update in 45 sec. or less.
I'm having a hard time debugging because it's interacting with a program.
Thanks in advance for your help
Gil
[code]
GetScreenRes>sX,sY
ScreenCapture>0,0,%sX%,%sY%,c:\CP_Macros\Asia\AesShipmentAddedScreen.bmp
WaitRectChanged>628,460,853,473,60
Wait>0.5
Press Alt
SendText>o
Release Alt
Wait>0.5
//Waiting for a field to update, sending refresh command
Repeat
Press Alt
SendText>r
Release Alt
Wait>2
Until>WRC_Result=True
[/code]
Help with WaitRectChanged
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Of course we don't know if you looking in the right place, but your WaitRectChanged> syntax is correct.
Once you get past whatever is causing it to hang, your Repeat> loop is going to fail. Two things.
- Your Repeat> line needs to include WRC_Result.
Repeat>WRC_Result
- Where are you acquiring a value for the variable "WRC_Result"? Nowhere in the snippet you've posted. And if you are in the repeat loop, how is "WRC_Result" value going to change to "True" so the loop can eventually end?
Once you get past whatever is causing it to hang, your Repeat> loop is going to fail. Two things.
- Your Repeat> line needs to include WRC_Result.
Repeat>WRC_Result
- Where are you acquiring a value for the variable "WRC_Result"? Nowhere in the snippet you've posted. And if you are in the repeat loop, how is "WRC_Result" value going to change to "True" so the loop can eventually end?
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
[quote]Where are you acquiring a value for the variable "WRC_Result"?[/quote]
I thought that when WaitRectChanged> sees a change it sets the variable WRC_Result to true ,based on what I read in the help file.
Are you saying that WRC_Result needs to be declared?
If so it not explained in help for the command .
As you can probably tell this is my first attempt at using a loop.
If there is a better way of testing the results of WaitRectChange please point me in the right direction.
I thought that when WaitRectChanged> sees a change it sets the variable WRC_Result to true ,based on what I read in the help file.
Are you saying that WRC_Result needs to be declared?
If so it not explained in help for the command .
As you can probably tell this is my first attempt at using a loop.
If there is a better way of testing the results of WaitRectChange please point me in the right direction.
Thank you in advance for all your help
Gil
Gil