PageRenderTime 48ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. <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
  2.  </td><td><var class="pdparam">filename</var><code>)</code>;</td></tr></table></div><p>Run the BeanShell script named by
  3. <em class="parameter"><code>filename</code></em> in a copy of the existing
  4. namespace and in a separate thread. Returns the
  5. <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
  6.  </td><td><var class="pdparam">cmdline</var><code>)</code>;</td></tr></table></div><p>Start the external process by calling
  7. <code class="function">Runtime.exec()</code> on
  8. <em class="parameter"><code>cmdline</code></em>. Any output is directed to the
  9. 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
  10.  </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
  11. a BeanShell script in the interpreter's current namespace.
  12. Returns the result of the evaluation of
  13. <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
  14. <b class="fsfunc">run</b>(</code></td><td>String
  15.  </td><td><var class="pdparam">filename</var><code>)</code>;</td></tr></table></div><p>Run the BeanShell script named by
  16. <em class="parameter"><code>filename</code></em> in a copy of the existing
  17. namespace. The return value represent the object context of the
  18. 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
  19. <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>,
  20. BeanShell scripts are allowed to change and modify private
  21. variables, and call private methods. The default is
  22. <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
  23. <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>,
  24. BeanShell scripts must follow a much more strict, Java-like
  25. syntax, and are not able to use the convenience features
  26. described in <a class="xref" href="macro-tips-BeanShell.html#macro-tips-BeanShell-convenience" title="BeanShell's Convenience Syntax">the section called &#8220;BeanShell's Convenience Syntax&#8221;</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
  27.  </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>
  28. as a BeanShell script in the interpreter's current
  29. 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>