I want to assign the value of "active_app_name" to a custom variable. I have tried {active_app_name} in the text, but it's not working.
Is it possible to do it with this action, or do I have to use an applescript action?
This is the screenshot of what I've tried:
Hi @jordikt,
I was able to assign the value of the active_app_name Advanced Trigger Condition Variable to a custom variable by following these steps:
-
Under Automations & Named & Other Triggers, create a Active App Did Change Trigger.
-
Create a Run Apple Script (async in background) Action assigned to the Trigger.
-
Add this AppleScript code to the Action:
tell application "BetterTouchTool"
set the_name_of_the_active_app to get_string_variable "active_app_name"
set_persistent_string_variable "AWDC_ActiveAppName" to the_name_of_the_active_app
end tell
Thanks for the script @fortred2 !!
Anyway, I would like to use the "Assign/Set Value for Variable" action. Let's see what @Andreas_Hegenberg says…
that action can currently only set static values, but allowing variables there is a good idea
It would also great to allowing variables in "Advanced Conditions" and "If Condition" action.
I mean to allow this:
Is it planned to allow variables for the "Assign/Set Value for Variable" action?
And for the "Advanced Conditions" fields?
And for the "If Condition" action?
Thx!
I want to implement a smart brightness system when using specific apps - so would love this idea of using a variable in setBrightness!
Thanks
AFAIK not yet.
@Andreas_Hegenberg is this feature request in the to do list?
using variables in there has been supported for quite a while, sorry I didn’t post an update here
Confirmed, it works!
Thanks @Andreas_Hegenberg