Skip to content

Instantly share code, notes, and snippets.

@OKsign
Created December 1, 2020 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OKsign/db054ce63e3c3cdf067f224558941765 to your computer and use it in GitHub Desktop.
Save OKsign/db054ce63e3c3cdf067f224558941765 to your computer and use it in GitHub Desktop.
-- Requirement: application 'BetterTouchTool'
-- user input
set UUID_user to "DA47E447-6FF8-4D71-BAC6-643E5AEB9111"
set name_of_app to "All Apps" -- If you select 'All Apps' in BetterTouchTool, set name_of_app to "All Apps."
-- end of user input
-- user options
set done_dialog to "on" -- "on" or "off"
-- end of user options -----------------------------------------------
if name_of_app is "All Apps" then
tell application "BetterTouchTool"
execute_assigned_actions_for_trigger UUID_user
end tell
if done_dialog is "on" then
tell application "System Events"
set activeApp to (get name of first process where it is frontmost)
end tell
tell application activeApp
display dialog "Done!" with title "Script 52"
end tell
end if
return
end if
if application name_of_app is running then
tell application "System Events"
set activeApp to (get name of first process where it is frontmost)
end tell
if activeApp is name_of_app then
tell application "BetterTouchTool"
execute_assigned_actions_for_trigger UUID_user
end tell
if done_dialog is "on" then
tell application name_of_app
display dialog "Done!" with title "Script 52"
end tell
end if
end if
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment