Created
September 6, 2016 07:33
-
-
Save nazimamin/9b6e337781036c31ce97f4c964222290 to your computer and use it in GitHub Desktop.
automator: Launch terminal from right click & close duplicate windows
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 run {input, parameters} | |
tell application "Terminal" | |
close (every window whose name contains "PokemonGo-bot") | |
end tell | |
tell application "System Events" to tell process "Terminal" | |
if exists (sheet 1 of window 1) then | |
tell application "System Events" to click UI element "Terminate" of sheet 1 of window 1 of application process "Terminal" | |
end if | |
end tell | |
tell application "Terminal" | |
activate | |
do script with command "cd desktop/pokemongo-bot && python pokecli.py -af configs/auth_fizz.json -cf configs/config.json -l" & "\"" & input & "\"" | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment