/www/tags/NOV_07_2009/htdocs/users-guide/bsh-commands-script.html
HTML | 29 lines | 29 code | 0 blank | 0 comment | 0 complexity | d3a4fee86d04121a4a590f2b7b4a3163 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>Script Execution Commands</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="jEdit 4.3 User's Guide"><link rel="up" href="bsh-commands.html" title="Chapter 16. BeanShell Commands"><link rel="prev" href="bsh-commands-resource.html" title="Resource Management Commands"><link rel="next" href="bsh-commands-object.html" title="BeanShell Object Management Commands"></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">Script Execution Commands</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bsh-commands-resource.html">Prev</a> </td><th width="60%" align="center">Chapter 16. BeanShell Commands</th><td width="20%" align="right"> <a accesskey="n" href="bsh-commands-object.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="bsh-commands-script"></a>Script Execution Commands</h2></div></div></div><div class="itemizedlist"><ul type="disc"><li><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">Thread <b class="fsfunc">bg</b>(</code></td><td>String
- </td><td><var class="pdparam">filename</var><code>)</code>;</td></tr></table></div><p>Run the BeanShell script named by
- <em class="parameter"><code>filename</code></em> in a copy of the existing
- namespace and in a separate thread. Returns the
- <code class="classname">Thread</code> object so created.</p></li><li><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">exec</b>(</code></td><td>String
- </td><td><var class="pdparam">cmdline</var><code>)</code>;</td></tr></table></div><p>Start the external process by calling
- <code class="function">Runtime.exec()</code> on
- <em class="parameter"><code>cmdline</code></em>. Any output is directed to the
- output stream of the calling process.</p></li><li><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">Object <b class="fsfunc">eval</b>(</code></td><td>String
- </td><td><var class="pdparam">expression</var><code>)</code>;</td></tr></table></div><p>Evaluates the string <em class="parameter"><code>expression</code></em> as
- a BeanShell script in the interpreter's current namespace.
- Returns the result of the evaluation of
- <code class="constant">null</code>.</p></li><li><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">org.gjt.sp.jedit.bsh.This
- <b class="fsfunc">run</b>(</code></td><td>String
- </td><td><var class="pdparam">filename</var><code>)</code>;</td></tr></table></div><p>Run the BeanShell script named by
- <em class="parameter"><code>filename</code></em> in a copy of the existing
- namespace. The return value represent the object context of the
- script, allowing you to access its variables and methods.</p></li><li><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void
- <b class="fsfunc">setAccessibility</b>(</code></td><td>boolean </td><td><var class="pdparam">flag</var><code>)</code>;</td></tr></table></div><p>If <em class="parameter"><code>flag</code></em> is <code class="literal">true</code>,
- BeanShell scripts are allowed to change and modify private
- variables, and call private methods. The default is
- <code class="literal">false</code>.</p></li><li><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void
- <b class="fsfunc">setStrictJava</b>(</code></td><td>boolean </td><td><var class="pdparam">flag</var><code>)</code>;</td></tr></table></div><p>If <em class="parameter"><code>flag</code></em> is <code class="literal">true</code>,
- BeanShell scripts must follow a much more strict, Java-like
- syntax, and are not able to use the convenience features
- described in <a class="xref" href="macro-tips-BeanShell.html#macro-tips-BeanShell-convenience" title="BeanShell's Convenience Syntax">the section called “BeanShell's Convenience Syntax”</a>.</p></li><li><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">source</b>(</code></td><td>String
- </td><td><var class="pdparam">filename</var><code>)</code>;</td></tr></table></div><p>Evaluates the contents of <em class="parameter"><code>filename</code></em>
- as a BeanShell script in the interpreter's current
- namespace.</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="bsh-commands-resource.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bsh-commands.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bsh-commands-object.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Resource Management Commands </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> BeanShell Object Management Commands</td></tr></table></div></body></html>