How to create loop start and stop for ' cmd+k ' ... toggle action

How to create start/stop loop action using using apple script as well as without script


when i press "cmd+k"
loop start and it start pressing "arrow up" key with random time delay between 2 to 3 second

when i again press "cmd+k"
loop stops immediately

when i again press "cmd+k"
loops start again

please help me ...i am new for this softawre ...

if it is possible using only better touch tool please tell me all steps ..

if not then tell me apple script for key action

i don't know how to set keyboard arrow up button in if condition there is no option .. to set key board button ..

thank for the reply but it's not working for me ..

i am new

you don't even know how to set loop action ..just wasting your time ... if don't know all steps please keep quite ...

the next BTT version (alpha version will be released in 1-2 days) will have a predefined action "cancel repeat / cancel for loop" to make this easier.

However @chenxiccc's first screenshot was a good hint how you could achieve it currently using the break action. (It could e.g. break when a variable gets a specific value)

Please keep the discussion friendly @chenxiccc was just trying to help and posted a good example on how to use the break action.

i was thinking to make purchase for this software but it's not easy to use body here to tell me how do i make setup ... if have to waste time to learn all programming script .. i would like to go for open source option ...

not a single person here who can give proper solution for my question ...

Sure, if you are looking for open source solutions I recommend Hammerspoon.