PageRenderTime 63ms CodeModel.GetById 35ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/42docs/users-guide/bsh-commands-script.html

#
HTML | 28 lines | 28 code | 0 blank | 0 comment | 0 complexity | 993569a09d27b22cfb31b89aa6497ba9 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.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="bsh-commands.html" title="Chapter 16. BeanShell Commands"><link rel="previous" 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></div><div class="itemizedlist"><ul type="disc"><li><div class="funcsynopsis"><p><code class="funcdef">Thread <b class="fsfunc">bg</b>(</code>String <var class="pdparam">filename</var><code>)</code>;</p></div><p>
  2. Run the BeanShell script named by <i class="parameter"><tt>filename</tt></i>
  3. in a copy of the existing namespace and in a separate thread. Returns
  4. the <tt class="classname">Thread</tt> object so created.
  5. </p></li><li><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">exec</b>(</code>String <var class="pdparam">cmdline</var><code>)</code>;</p></div><p>
  6. Start the external process by calling
  7. <tt class="function">Runtime.exec()</tt> on
  8. <i class="parameter"><tt>cmdline</tt></i>. Any output is directed to the
  9. output stream of the calling process.
  10. </p></li><li><div class="funcsynopsis"><p><code class="funcdef">Object <b class="fsfunc">eval</b>(</code>String <var class="pdparam">expression</var><code>)</code>;</p></div><p>
  11. Evaluates the string <i class="parameter"><tt>expression</tt></i> as
  12. a BeanShell script in the interpreter's current namespace.
  13. Returns the result of the evaluation of <tt class="constant">null</tt>.
  14. </p></li><li><div class="funcsynopsis"><p><code class="funcdef">bsh.This <b class="fsfunc">run</b>(</code>String <var class="pdparam">filename</var><code>)</code>;</p></div><p>
  15. Run the BeanShell script named by <i class="parameter"><tt>filename</tt></i>
  16. in a copy of the existing namespace. The return value represent
  17. the object context of the script, allowing you to access its variables
  18. and methods.
  19. </p></li><li><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">setAccessibility</b>(</code>boolean <var class="pdparam">flag</var><code>)</code>;</p></div><p>
  20. If <i class="parameter"><tt>flag</tt></i> is <tt class="literal">true</tt>,
  21. BeanShell scripts are allowed to change and modify private variables, and call private methods. The default is <tt class="literal">false</tt>.
  22. </p></li><li><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">setStrictJava</b>(</code>boolean <var class="pdparam">flag</var><code>)</code>;</p></div><p>
  23. If <i class="parameter"><tt>flag</tt></i> is <tt class="literal">true</tt>,
  24. BeanShell scripts must follow a much more strict, Java-like syntax, and are not able to use the convenience features described in <a href="macro-tips-BeanShell.html#macro-tips-BeanShell-convenience" title="BeanShell's Convenience Syntax">the section called &#8220;BeanShell's Convenience Syntax&#8221;</a>.
  25. </p></li><li><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">source</b>(</code>String <var class="pdparam">filename</var><code>)</code>;</p></div><p>
  26. Evaluates the contents of <i class="parameter"><tt>filename</tt></i>
  27. as a BeanShell script in the interpreter's current namespace.
  28. </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>