| Prev | Next | Basic Verbs > systemEvent |
systemEvent
| Syntax |
systemEvent (verbClass, verbID [, key1, value1 [..., keyN, valueN]])
|
| Params |
verbClass is a string4 indicating the Apple event verb class. verbID is a string4 indicating the Apple event verb ID. key1 is a string4 indicating the keyword for the first parameter value. value1 is the first parameter value, and can be any type. [keyN, valueN] are additional keyword and parameter value pairs.
|
| Action |
Sends an Apple event of the indicated class and ID to a System EventX, one parameter for each keyN, valueN pair provided, and interprets the reply.
|
| Returns |
The value contained in the reply from the handler. The value can be any type.
|
| Examples |
systemEvent ('barc', 'gval', '----', short (n)) » 4 «BarChart installs a system event handler for the "get bar value" event
|
| Errors |
If no system event handler is installed to handle the event, an error will occur.
|
| Platform Notes |
This verb is only implemented in the Mac OS version of Frontier.
|
| Notes |
Any number of key, value parameter pairs may be provided, including zero (none). Any key, value pair can be replaced by a table name. The values in the table will be included in the event, with the item names as the parameter keys. The item names must all be four characters long. In Frontier 3.0 and above, a key, value pair can be replaced by a record value. The values in the record will be included in the event, with the record keys as the parameter keys. The type of each parameter value determines the corresponding descriptor type in the outgoing Apple event. For all non-binary values, the descriptor type will be typeOf (value). For a binary value, the descriptor type will be getBinaryType (value). Thus, if you need to send a value with a different descriptor type than Frontier's default, you can coerce the value to a binary value, and then use setBinaryType to specify the desired type. The descriptor type in the result determines the type of the result value. If it corresponds to one of Frontier's built-in types, a value of that type is returned. Otherwise, a binary value is returned, with its binaryType set to the descriptor type.
|
| See Also |
appleEvent
|
| Prev | Next | Basic Verbs > systemEvent |