Last active
August 29, 2015 14:08
-
-
Save hernamesbarbara/8ffd765aa5797f9b0e33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/osascript | |
(* subroutine to bring an application to front. | |
you could invoke it from an alias in your | |
~/.bash_profile, another script or an alfred workflow | |
*) | |
property default_app : "" | |
on bring_to_front(app_name) | |
set res to false | |
if app_name is not "" then | |
try | |
tell application app_name | |
activate # open the app even if not running yet | |
reopen # ensure minimized windows pop open | |
end tell | |
set res to true | |
end try | |
end if | |
return res | |
end bring_to_front | |
bring_to_front("Skype") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment