/www/tags/NOV_07_2009/htdocs/42docs/users-guide/launcher-interface.html
HTML | 66 lines | 66 code | 0 blank | 0 comment | 0 complexity | 0b5bf6696c94c8b3095849d75135dadf MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The jEditLauncher Interface</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="launcher-guide.html" title="Appendix G. jEditLauncher for Windows"><link rel="previous" href="launcher-uninstall.html" title="Uninstalling jEdit and jEditLauncher"><link rel="next" href="launcher-examples.html" title="Scripting Examples"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The jEditLauncher Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="launcher-uninstall.html">Prev</a> </td><th width="60%" align="center">Appendix G. jEditLauncher for Windows</th><td width="20%" align="right"> <a accesskey="n" href="launcher-examples.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="launcher-interface"></a>The jEditLauncher Interface</h2></div></div><div></div></div><p>
- The core of the jEditLauncher package is a COM component that can
- communicate with the EditServer, or open jEdit if it is not running or
- is otherwise refusing a connection. The component supports both Windows
- and UNC file specifications, including wild cards. It will resolve
- shortcut links to identify and transmit the name of the underlying file.
- </p><p>
- Because it is implemented with a “<span class="quote">dual interface</span>”, the
- functions of jEditLauncher are available to scripting languages in the
- Windows environment such as VBScript, JScript, Perl (using the
- Win32::OLE package) and Python (using the win32com.client package).
- </p><p>
- The scriptable interface consists of two read-only properties and
- six functions:
- </p><p>
- <span class="emphasis"><em>Properties</em></span>
- </p><div class="itemizedlist"><ul type="disc"><li><p>
- <tt class="varname">ServerPort</tt> - a read-only property that returns the
- port number found in jEdit's server file; the value is not tested for
- authenticity. It returns zero if the server information file cannot
- be located.
- </p></li><li><p>
- <tt class="varname">ServerKey</tt> - a read-only property that returns the numeric
- authorization key found in jEdit's server file; the value is not tested
- for authenticity. It returns zero if the server information file cannot
- be located.
- </p></li></ul></div><p>
- <span class="emphasis"><em>Functions</em></span>
- </p><div class="itemizedlist"><ul type="disc"><li><p>
- <tt class="function">OpenFile</tt> - a method that takes a single file name
- (with or without wild card characters) as a parameter.
- </p></li><li><p>
- <tt class="function">OpenFiles</tt> - this method takes an array of file names
- (with or without wild card characters) as a parameter. The form of the
- array is that which is used for arrays in the scripting environment. In
- JScript, for example the data type of the <tt class="classname">VARIANT</tt> holding
- the array is <tt class="classname">VT_DISPATCH</tt>; in VBScript, it is <tt class="classname">VT_ARRAY
- | VT_VARIANT</tt>, with array members having data type
- <tt class="classname">VT_BSTR</tt>.
- </p></li><li><p>
- <tt class="function">Launch</tt> - this method with no parameters attempts to
- open jEdit without loading additional files.
- </p></li><li><p>
- <tt class="function">RunScript</tt> - this method takes a file name or full file
- path as a parameter and runs the referenced file as a BeanShell script in jEdit.
- The predefined variables <tt class="varname">view</tt>, <tt class="varname">editPane</tt>,
- <tt class="varname">textArea</tt> and <tt class="varname">buffer</tt> are available to the
- script. If more than one view is open, the variable are
- initialized with reference to the earliest opened view. If no path is
- given for the file it will use the working directory of the calling process.
- </p></li><li><p>
- <tt class="function">EvalScript</tt> - this method takes a string as a
- parameter containing one or more BeanShell statements and runs the script
- in jEdit's BeanShell interpreter. The
- predefined variables are available on the same basis as in
- <tt class="function">RunScript</tt>.
- </p></li><li><p>
- <tt class="function">RunDiff</tt> - this method takes two strings
- representing file names as parameters. If the
- <span class="application">JDiff</span> plugin is installed, this method
- will activate the JDiff plugin and display the two files in the
- plugin's graphical “<span class="quote">dual diff</span>” format. The first
- parameter is treated as the base for display purposes. If the
- <span class="application">JDiff</span> plugin is not installed, a
- error message box will be displayed in jEdit.
- </p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="launcher-uninstall.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="launcher-guide.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="launcher-examples.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Uninstalling jEdit and jEditLauncher </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Scripting Examples</td></tr></table></div></body></html>