Created
May 17, 2014 19:27
-
-
Save ianbattersby/1d82bcc19c404b4e857b to your computer and use it in GitHub Desktop.
Alfred workflow examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on alfred_script(q) | |
do shell script "open /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app" | |
end alfred_script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on alfred_script(q) | |
if isAppRunning("iTerm") then | |
activate | |
tell application "System Events" | |
keystroke "O" using {command down} | |
end tell | |
tell application "iTerm" | |
set myterm to (make new terminal) | |
tell myterm | |
set codingsession to (launch session "Coding") | |
tell codingsession | |
end tell | |
end tell | |
activate | |
end tell | |
else | |
activate application "iTerm" | |
end if | |
end alfred_script | |
on isAppRunning(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end isAppRunning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment