Repeat assigned action while touching - Alternative (automation)?


I have an application I want to keep alive by sending keystrokes.

The function "Repeat assigned action while touching" seems like a solution to me, however, as the name states it only works while touching a button.

Is there any way to let BTT send those keystroke to the application in the background until I cancel it manually (or after a certain amount of time that can be predefined)?

Thanks for your help.

The solution should be to have an applescript running in background.
But am I correct that you want that for a ssh connection?
If this is the case, you should add in your .ssh/config file

Host *
    ServerAliveInterval 300
    ServerAliveCountMax 2

Thank you for the reply.

I have a remote VNC application running (like teamviewer) and need to send any command there to keep the application (or the VM) running.

Any other idea how so solve this perhaps?

The standard function "repeat assigned action while touching" does exactly what I want with the tiny exception that I don't want to press/hold the button all the time. It should basically run on its own until cancelled and send any command to the application to keep it alive.

Thank you again.

Did you try to write an applescript?
In this case to avoid that BTT kills the script, you have to launch it via the shell.

Within the applescript, you can trigger your action every X second (look at the documentation of BTT if you want/need to use BTT to send the action)



Thank you again.

I was hoping for a plug&play solution since I am not very skilled with scripting and BTT has this functionality basically integrated (just not completely automated but with the need to hold the button pressed for the action).

I was hoping that I am not the only one out there wanting to send automated keystrokes to an application to keep it alive :slight_smile:

To clarify my request - how can I simulate basically this feature only I do not want to hold the button but trigger the action indefinitely (or until I press again).

Repeat Action

Thanks again :slight_smile:


applescript is the only way as far as I know

note that if you really want infinite loop.
BTT has a nice way to run cron:
(in the named and others trigger you can select "Time based trigger"