Wait until commandKey is down only works once
Posted: Fri Aug 22, 2025 8:21 pm
Hi, I’m facing a problem I thought I had already solved, but now I’m stuck again and can’t make it work.
I’m trying to run three actions, each triggered by a separate press of the Command key:
But it runs through all steps quickly after the first press, as if the key remains down and the condition is always true.
I’ve tried approaches like repeat while, repeat until, is down, is up... but nothing seems to work.
Could someone please help?
Thanks in advance!
I’m trying to run three actions, each triggered by a separate press of the Command key:
Code: Select all
on mouseUp
wait until the commandKey is down
put "AAAAA"
wait until the commandKey is down
put "BBBBB"
wait until the commandKey is down
put "CCCCC"
end mouseUp
But it runs through all steps quickly after the first press, as if the key remains down and the condition is always true.
I’ve tried approaches like repeat while, repeat until, is down, is up... but nothing seems to work.
Could someone please help?
Thanks in advance!