Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scripting:start [2014/02/09 01:50] – external edit 127.0.0.1scripting:start [2018/03/22 19:29] (current) – external edit 127.0.0.1
Line 4: Line 4:
 ===== Supported Scripting Engines ===== ===== Supported Scripting Engines =====
  
-HippoEDIT uses [[http://en.wikipedia.org/wiki/Active_Scripting|ActiveScripting]] and because of that supports any installed active scripting engine. By default supported  JavaScript and VBScript. If you start any VBS or JS file inside of HippoEDIT with Execute command or as tool, HE will assume that it is HE script and will try to execute passing scripting objects. So it can work with any *.js or *.vbs file. But for convenience there are also dedicated schemes inherited from JS ans  VBS syntaxes and associated with *.hejs and *.hevbs extensions correspondingly. Dedicated schemes extended by HE specific syntax. Till now only HEJS schema is up to date. HEVBS will be updated later. +HippoEDIT uses [[http://en.wikipedia.org/wiki/Active_Scripting|ActiveScripting]] and because of that supports any installed active scripting engine. By default supported  JavaScript and VBScript. If you start any VBS or JS file inside of HippoEDIT with Execute command or as tool, HE will assume that it is HE script and will try to execute passing scripting objects. So it can work with any *.js or *.vbs file. But for conveniencethere are also dedicated schemes inherited from JS and  VBS syntaxes and associated with *.hejs and *.hevbs extensions correspondingly. Dedicated schemes extended by HE specific syntax. Till now only HE JS schema is up to date. HE VBS will be updated later. 
  
 These resources can be used as starting point for learning scripting languages: These resources can be used as starting point for learning scripting languages:
Line 10: Line 10:
   * [[http://www.w3schools.com/vbscript/default.asp|VBScript Tutorial]]   * [[http://www.w3schools.com/vbscript/default.asp|VBScript Tutorial]]
  
-It is also possible to write scripts in other languagesif they there is Active Script engine available+It is also possible to write scripts in other languages if they there is Active Script engine available
   * [[scripting:python|How to use Python for scripting]]   * [[scripting:python|How to use Python for scripting]]
  
Line 17: Line 17:
 If you think about implementing something with scripting, you have two choices: If you think about implementing something with scripting, you have two choices:
   * **[[scripting:tool|Tool script]]** - script that executes and behaves as normal tool. It runs, does the work and exits.    * **[[scripting:tool|Tool script]]** - script that executes and behaves as normal tool. It runs, does the work and exits. 
-  * **[[scripting:service|Service script]]** or, another name, **Script Plugin** - this is a rich version of scripts, similar to real binary plugins, which starts automatically, live in background and react on such user interaction as keystroke, menu or toolbar selection.+  * **[[scripting:service|Service script]]** or, another name, **Script Plugin** - this is a rich version of scripts, similar to real binary plugins, which starts automatically, live in the background and react on such user interaction as keystroke, menu or toolbar selection.
  
 ===== Basics ===== ===== Basics =====
-Scripting in HippoEDIT is not very different to any scripting implementation by other applications and very similar to scripts you can run for web browser (like Internet Explorer, Firefox, Chrome etc). Any script for browser or other application which does not use internal objects exposed by application itself (like //window// in browsers) should also run in HippoEDIT. All tricks with objects, inheritance, prototypes, accessing via //this// should also work.+Scripting in HippoEDIT is not very different to any scripting implementation by other applications and very similar to scripts you can run in a web browser (like Internet Explorer, Firefox, Chrome etc). Any script for browser or other application which does not use internal objects exposed by the application itself (like //window// in browsers) should also run in HippoEDIT. All tricks with objects, inheritance, prototypes, accessing via //this// should also work.
  
 There are some specialties, which implements HippoEDIT and which make it a little bit different (from functional but not conceptual side) from other scripting hosts (applications which allow scripting of them): There are some specialties, which implements HippoEDIT and which make it a little bit different (from functional but not conceptual side) from other scripting hosts (applications which allow scripting of them):
   * Of course, this is its own **set of [[scripting:api:start|named objects]]** exposed to script (as //Application//)   * Of course, this is its own **set of [[scripting:api:start|named objects]]** exposed to script (as //Application//)
-  * **[[scripting:includes-imports|Support of including and importing]]** of other script files (this is rather rare feature) +  * **[[scripting:includes-imports|Support of including and importing]]** of other script files (this is  a  rather rare feature) 
-  * **[[scripting:wsh|Emulating of WSH]]** (Window Scripting Host) objects, to make it easier migration from WSH to HippoEDIT or even to run WSH scripts directly in HippoEDIT. Emulation works well on basic feature level, but some stuff is not supported +  * **[[scripting:wsh|Emulating of WSH]]** (Window Scripting Host) objects, to make it easier migration from WSH to HippoEDIT or even to run WSH scripts directly in HippoEDIT. Emulation works well on basic feature level, but some stuff is not supported 
   * **[[scripting:events:start|Events concept]]**. This one of most powerful HippoEDIT features, which is similar to dynamic events in web browsers    * **[[scripting:events:start|Events concept]]**. This one of most powerful HippoEDIT features, which is similar to dynamic events in web browsers 
   * Support of **[[scripting:dialogs|native dialog]]** descriptions and data bindings   * Support of **[[scripting:dialogs|native dialog]]** descriptions and data bindings
Line 38: Line 38:
 Copy+Paste the code to new JavaScript document and try with //Tools->Execute//. Copy+Paste the code to new JavaScript document and try with //Tools->Execute//.
  
-<note tip>For easy start with your new script plugin, you can use Service Script Wizard from [[plugins:scripting_tools|Scripting Tools plugin]]</note>+<note tip>For an easy start with your new script plugin, you can use Service Script Wizard from [[plugins:scripting_tools|Scripting Tools plugin]]</note> 
 + 
 +==== Examples ==== 
 +  * [[scripting:examples:text-highlight|Using Text Highlight]]