Holdkey until image appears

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Ruffy
Newbie
Posts: 1
Joined: Sun Jul 15, 2018 3:23 pm

Holdkey until image appears

Post by Ruffy » Sun Jul 15, 2018 3:30 pm

Hello, i need some easy code for my script. I need to hold key until image pop up. I trying something like this

Code: Select all

Press Down
WaitScreenImage
Release Down
In my mind its easiest way for it but ofcourse its too simple to work haha... anyone can help me?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Holdkey until image appears

Post by Marcus Tettmar » Tue Jul 17, 2018 7:41 am

Not sure this is possible. You could have a custom OnEvent which sets a flag when an image appears, but it won't be able to interrupt HoldKey. If however you don't actually need to HOLD the key and can keep pressing it in a loop you could have the loop exit early when the flag is set.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts