AppleScript.runEvent() This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to AppleScript Class Summary

The AppleScript Class has been deprecated in Zinc 4.0. It is included for legacy support but is no longer maintained and maybe removed completely in a future 4.x update.

Availability
Mac OSX

Usage
mdm.AppleScript.runEvent(eventName:String[param1:String[,param2:String[,...]]]):String

Parameters
eventName:String - Reference to the event name

param:String - Reference to an optional event parameter

Returns
A String

Description
Executes an Event (a Function that resides inside a AppleScript).

Notes
Up to 8 parameters can be passed into the 'param' parameter.

Example Code
// Let's assume we have set the following AppleScript using mdm.AppleScript.setScript():
on showDialog (message)
display dialog message
end showDialog

//As you can see, the event (function) is called 'showDialog 'and it has 1 parameter, 'message'. To run this event, our script would be:

var myResult:Boolean = mdm.AppleScript.runEvent("showDialog", "Hello World");

mdm.AppleScript Class Example Downloads
No Example Downloads Available


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page