![]() Open -jg usually opens an application hidden ( -j) and without making it frontmost ( -g). osascript -e 'tell app "TextEdit"' -e reopen -e activate -e end also reopens a default window if TextEdit is running but has no open windows. If an application like TextEdit or Mail is not running, launch and activate open a new visible default window. launch doesn't make an application frontmost but activate does. Osascript -e 'launch app "AppName" and osascript -e 'activate app "AppName" are blocked until the application finishes opening. Osascript -e 'launch app "ScreenRecycler"' You can run the script at login by for example saving the plist below as ~/Library/LaunchAgents/. Pgrep -qx Transmission||open -jga Transmission ![]() If you're using a shell script to open applications, try something like this: osascript -e 'launch app "ScreenRecycler"'
0 Comments
Leave a Reply. |