how can i using if condition with WaitPixelColor?
im new with this app...
IF CONDITION
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1354
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: IF CONDITION
Here you go.
Code: Select all
WaitPixelColor>16777215,652,355,10
IF>WPC_RESULT=TRUE
Messagemodal>Pixel was found
Endif
IF>WPC_RESULT=FALSE
Messagemodal>Pixel was not found
Endif
Yes, we have a Custom Scripting Service. Message me or go here
Re: IF CONDITION
Hi, Thankyou Dorian
but why i must add symbol {}
in the false or true?
if i not using that symbol, still not working, can u explain why?
Thankyou
but why i must add symbol {}
in the false or true?
if i not using that symbol, still not working, can u explain why?
Thankyou
- Dorian (MJT support)
- Automation Wizard
- Posts: 1354
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: IF CONDITION
I just tested it and it works perfectly without those. Can you share your code please? Could you possibly have added spaces to the end of the "If" line and turned off the trailing spaces warning? That's the only way I seem able to make it work with curly braces and fail without them.
That sample will wait for 10 seconds until the pixel at 652,355 changes to 16777215. So you won't see it "do anything" for 10 seconds. Either way, after 10 seconds if you haven't changed any of the values in line 1 you should see "Pixel was not found".
If you look to the right of the button bar in your editor you'll see your mouse coordinates there. Click on the dropdown there and enable "Pixel Color" and "Follow Cursor". Now you'll see X,Y, and the Pixel Color as you move your mouse. If you move your mouse, you'll see those values change accordingly. Now pressing your left and right mouse buttons together, but you should see "Copied" for a fraction of a second. This will copy the values to your clipboard and will help ensure you have the correct values.
This video demonstrates my explanation.
That sample will wait for 10 seconds until the pixel at 652,355 changes to 16777215. So you won't see it "do anything" for 10 seconds. Either way, after 10 seconds if you haven't changed any of the values in line 1 you should see "Pixel was not found".
If you look to the right of the button bar in your editor you'll see your mouse coordinates there. Click on the dropdown there and enable "Pixel Color" and "Follow Cursor". Now you'll see X,Y, and the Pixel Color as you move your mouse. If you move your mouse, you'll see those values change accordingly. Now pressing your left and right mouse buttons together, but you should see "Copied" for a fraction of a second. This will copy the values to your clipboard and will help ensure you have the correct values.
This video demonstrates my explanation.
Yes, we have a Custom Scripting Service. Message me or go here
Re: IF CONDITION
Hi Dorian, thanks for the answer
i was tested, the code cant work normaly cause i not using capital on wpc_result
i was tested, the code cant work normaly cause i not using capital on wpc_result