Hi
I want a script to press and hold the up arrow for 5 sec and then hold the down arrow for another 5 secs.
and it keeps repeating until an image is found.
is that possible.
Thank you
up and down arrow loop until image is found
Moderators: JRL, Dorian (MJT support)
Re: up and down arrow loop until image is found
this is the code i got till now, I just want the up and down button to be held for 5 secs (looping) until the image is found.
Code: Select all
label>start
//Wait for
WaitScreenImage>C:\Users\Asus\Desktop\test.PNG,0.7,CCOEFF
ScreenCapture>573,699,757,762,%TEMP_DIR%\screenrect.bmp
//Find and Left Click Center of
FindImagePos>C:\Users\Asus\Desktop\test.PNG,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>{%XArr_0%+573},{%YArr_0%+699}
LClick
wait>1
MouseMove>{%XArr_0%+573},{%YArr_0%+699}
LClick
Endif
goto>start
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: up and down arrow loop until image is found
You need to use the HoldKey function:
https://www.mjtnet.com/manual/holdkey.htm
You can specify a virtual key code. Mouse buttons have virtual key codes.
https://www.mjtnet.com/manual/holdkey.htm
You can specify a virtual key code. Mouse buttons have virtual key codes.
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?