activate
"activate" is a commad line tool to bring a specified process to front with only one window of the application.
Normal activation processes bring all window belong to the application into frontmost. For example, Sending activate event form AppleScript to an application process causes that all the application's windows rise. But in usual case, only one window is required. "activate" allows to avoid the screen is covered by needless windows.
To install "activate", copy the executable file to the directory which is included by the environment variable "PATH".
The syntax of the activate command is as follows
activate [-t] [Creator Type] [-i] [Bundle Identifier] [Process Name]
- Process Name
- Name of the application process. Usually the application name is shown in the left side of the menubar.
- More correctly, the value of "CFBundleName" of Information property list file of the application bundle.
- Creator Type
- Creator type of the application which expressed by 4 characters
- The value of "CFBundleSignature" of Information property list file of the application bundle
- Bundle Identifier
- The value of "CFBundleIdentifier" Information property list file of the application bundle
It is not necessary to assign all arguments. One of the arguments is required. If some arguments are given, the application process to meet all given conditions will be activated.
There are cases that "Process Name" is localized, therefore you should use "Creator Type" or "Bundle Identifier".
If it succeed to activate specified process, the command exit with status 0. If it fail to active specified application with certain reasons, for example the application is not found, the value "false" will be returned.
History
- 1.1.2 -- 2010-12-17
- Independent package for "activate" command from "SmartActivate"
- Re-supported Mac OS X 10.4.