Skip to content

Instantly share code, notes, and snippets.

@maddo
Created February 1, 2013 01:43
Show Gist options
  • Save maddo/4688482 to your computer and use it in GitHub Desktop.
Save maddo/4688482 to your computer and use it in GitHub Desktop.
run script file "<HD>:Users:<user>:Documents:sc:scpw.scpt"
run script file "<HD>:Users:<user>:Documents:sc:togglefn.scpt"
do shell script "open -a 'StarCraft II'"
set the clipboard to "<pw>"
--Check if GUI Scripting is Enabled
tell application "System Events"
if not UI elements enabled then
set UI elements enabled to true
end if
end tell
--Enable/Disable "Use all F1, F2, etc. keys as standard function keys" option in Keyboard & Mouse Preference pane and close System Preferences
tell application "System Events"
tell application "System Preferences"
reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
click checkbox 1 of tab group 1 of window 1 of application process "System Preferences"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment