Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scripting:service [2016/01/28 01:09] – [Paste template with a button] adminscripting:service [2018/06/13 00:18] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Service Scripts ====== ====== Service Scripts ======
  
-//Service scripts// (or //Script Plugins//) is a rich kind of scripts, that are very close in possibilities to [[plugins:create|binary plugins]] and allows you to create extensions for HippoEDIT that seamlessly integrating in its UI giving same feeling as native built-in functionality.+//Service scripts// (or //Script Plugins//) is a rich kind of scripts, that are very close in possibilities to [[plugins:create|binary plugins]] and allows you to create extensions for HippoEDIT that seamlessly integrating into its UI giving the same feeling as native built-in functionality.
  
-Such scripts are living resident in HippoEDIT process and react on events (as menu command selection, shortcut call, or document load). Another feature of service scripts is automatic loading on every HippoEDIT start. So, you install it, and than it runs alwaysuntil you uninstall it.+Such scripts are living resident in HippoEDIT process and react on events (as menu command selection, shortcut call, or document load). Another feature of service scripts is automatic loading on every HippoEDIT start. So, you install it, and then it runs always until you uninstall it.
  
-//Installation// here mean is simple running/execution of script using Tools->Execute... HippoEDIT automatically detects that script has been registered to one of events and keep plugin loaded (and reloads on start).\\+//Installation// here means simple running/execution of script using Tools->Execute... HippoEDIT automatically detects that script has been registered to one of events and keep plugin loaded (and reloads on start).\\
 //Un-install// means unload it with Tools->Options->Plugins->your plugin name -> uncheck.  //Un-install// means unload it with Tools->Options->Plugins->your plugin name -> uncheck. 
 ===== Examples ===== ===== Examples =====
Line 20: Line 20:
 ==== Paste template with a button ==== ==== Paste template with a button ====
 The scripts: The scripts:
-register icon to be used on toolbar +  * register icon to be used on the toolbar 
-creates and registers command to be executed on button click or by shortcut +  creates and registers command to be executed on button click or by shortcut 
-adds "enabled" callback to block execution if document is read only +  adds "enabled" callback to block execution if document is read-only 
-creates toolbar and toolbar button and assigns command to button.+  creates toolbar and toolbar button and assigns the command to the button.
  
 <file javascript insert-template.hejs> <file javascript insert-template.hejs>
Line 56: Line 56:
 </file> </file>
  
 +===== Further examples =====
 +  * [[scripting:examples:code-completion|]]