Hello,
I have some problems with a variable in the script.
I want to make a script with two choices.
the choices will need to be made within the program, the way it should be chosen depends on the background of how the program looks like, if a certain image appears, the script must perform a different action. I was so, but this script does not work I like to see your improved input.
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Wait>2
Let>FIP_SCANPIXELS=ALL
FindImagePos>%SCRIPT_DIR%\Win_2.bmp,SCREEN,0,1,XArr,YArr,NumFound
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Wait>2
MouseMove>560,632
Else>NumFound>1
MouseMove>363,647
Wait>2
LClick
Mousemove>550,462
LClick
MouseMove>560,641
LClick
Endif
thanks.
Problem with variable
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Aside from the syntax error your code seems to be saying "if more than zero results is found (i.e. if 1 or more results) do something, else if more than one is found do something else".
Since the second condition is also matched by the first condition (more than 1 is logically the same as more than 0) the second statement will never be met.
But Else>NumFound>1 is incorrect syntax anyway.
I think you need to tell us what it is that you want to do, and what conditions you want to check for, because your code doesn't tell us.
Since the second condition is also matched by the first condition (more than 1 is logically the same as more than 0) the second statement will never be met.
But Else>NumFound>1 is incorrect syntax anyway.
I think you need to tell us what it is that you want to do, and what conditions you want to check for, because your code doesn't tell us.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?