Pgrep -qx Transmission||open -jga Transmission DVI supports more resolutions, and dual-link DVI even more.如果您使用Shell脚本打开应用程序,请尝试以下操作: osascript -e 'launch app "ScreenRecycler"' The Apple displays themselves are true Progressive LCDs that are widescreen with color matching, extra ports, and an extra place to put an iSight mount if you can find an original iSight. Osascript -e 'launch app "ScreenRecycler"' You can run the script at login by for example saving the plist below as ~/Library/LaunchAgents/. Osascript -e 'launch app "AppName" and osascript -e 'activate app "AppName" are blocked until the application finishes opening. launch doesn't make an application frontmost but activate does. ![]() If an application like TextEdit or Mail is not running, launch and activate open a new visible default window. 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. Open -jg usually opens an application hidden ( -j) and without making it frontmost ( -g). For some applications like TextEdit and Mail, it opens a new visible window if the application is running but has no open windows. To avoid that, check if the application is already running with for example pgrep. The -j option for open was added in 10.8 and it is only shown in the help message and not on the man page. Lsappinfo launch launchandhide=true nofront=true /Applications/TextEdit.app also always opens TextEdit hidden and without making it frontmost. I don't know how to use lsappinfo to wait until an application finishes opening. ![]() You can add a login item with AppleScript: The settings for login items are stored in ~/Library/Preferences/.
0 Comments
Leave a Reply. |