Hints, tips and tricks for newbies
Moderators: Dorian (MJT support), JRL
-
Ruffy
- Newbie
- Posts: 1
- Joined: Sun Jul 15, 2018 3:23 pm
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?
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
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.