Hi,
For a while I have been trying to trigger actions in a way that does not double-trigger, which is important for scroll wheel-triggered events.
I have solved this by using the action "Launch Application/Applescript", where I run an Applescript with the following:
tell application "BetterTouchTool"
set_persistent_string_variable "customVariable1" to "SOMETHING"
end tell
Then, I have a "conditional activation group" named CAGName
whose trigger is
BTT Variable: customVariable1 isSOMETHING
Finally, I have an action with trigger CAG Activated: CAGName
whose Assigned Action is my desired action, plus "Launch Application/Applescript" for the following:
tell application "BetterTouchTool"
delay 0.5
set_persistent_string_variable "customVariable1" to "waiting"
end tell
This means that if I trigger the original action more than once in 0.5 seconds, actions assigned to the conditional activation group's activation should only happen once.
There are three straightforward better solutions I can think of:
- Create a BTT action called "Set Persistent BTT Variable _ to _" (with a GUI interface to change the variable) so that there's no need to call Applescript just to set these variables. This seems like a natural BTT addition to me.
- Add a checkbox to the "Delay next action" action that says "disable this action's trigger during delay". This would give triggers double-trigger protection if they included this as an additional action. I guess it would be impossible if "Actions" can't observe their own "Triggers".
- Add a checkbox for all triggers that says "Can trigger at most every 0 seconds" with a slider or textbox that controls the value. It could go right next to the "Prevent recursive triggers" checkbox
I don't know if any of these are possible for you! If they are possible and not too hard, I would be SO GRATEFUL if you included any of them. My current setup is very complicated to maintain.
Thank you!