Loading...
 

Script Host ZAAP Object References

Global objects


The following objects are available to all scripts. Note that the zbar, Fileand OtherFileobjects are notavailable during initialization of a script!

  • zbar: the ZBarCOM.Zaapobject that provides access to all information shared by ZTreeWin.


  • OtherFile: when in F8 split view mode, a Scripting.File(external link)or Scripting.Folder(external link)object instance representing the currently selected item in the opposite pane of ZTreeWin. When not in F8 split view mode, this object is Null (Nothingin VB).


Global functions


  • Alert(Text: String)
Displays a dialog box containing the Textmessage and an 'OK' button.

  • Confirm(Text: String): Boolean
Displays a dialog box containing the Textmessage, and the buttons 'OK' and 'Cancel'.
Returns Trueif the user clicked OK, Falseotherwise.)

  • CreateObject(ProgID: String): Variant
Creates and returns a reference to an Automation object.
Example: CreateObject("ADODB.Stream")returns a newly created Stream(external link)object.

  • Write(Text: String)
Writes the given text to the output console. (See also Script.Output).

  • WriteLine(Text: String)
Writes the given text, followed by a line break, to the output console. (See also Script.Output).




The Scriptobject


Methods


RegisterCommand(Command: String): Boolean
Indicates that this script's onAssistfunction should be triggered when the user enters the specified command on the Yor Ctrl-YAssist input line in ZTreeWin. This method is not case-sensitive, so Script.RegisterCommand('match')will cause the onAssist function to be invoked both when the user enters "smatch \d[
\d]" and when "sMatch \d[
\d]" is entered.

If registration is successful, the return value is True. If this fails for some reason (e.g. the command has already been registered by this or another script), the return value is False.

If a script does not register any command, its onAssist function will never be invoked.
If a script registers a command, but does not provide a function called onAssist, it will never be invoked. No error is raised.


  • RegisterKey(KeyCode: Integer, Alt: Boolean): Boolean
Indicates that this script's onKeyPressfunction should be triggered when the specified (Alt-)Ctrl-Shift-Key is pressed within ZTreeWin.
If a script does not register any key, but does contain a function called onKeyPress, then that function will be triggered for any Ctrl-Shift-key combo.

If registration is successful, the return value is True. If this fails for some reason, the return value is False.

Note that more than one script may register the same key combo; if this key is then pressed, the onKeyPressfunction of both scripts will be invoked, in no particular order.

Properties


The full path and filename of the current script.

The display name of the script. Defaults to the file name.

The output generated by this script using Writeand WriteLine.


~/np~


Contributors to this page: admin and vor0nwe .
Page last modified on Sunday 08 of November, 2009 14:57:26 EST by admin.