Shared Action: ClearChars

MINI LESSONS ›› Actions Editor ›› Shared Actions ›› Library ››

MINI LESSON

For general information on what a Shared Action is, and how they are used within ToolBook, click here.


CLEARCHARS

This Shared Action (from a collection of pre-written Shared Actions) will allow you to clear a series of characters within a string. It requires three parameters - the original string and the start and end character positions which you wish to be cleared. It will return a value representing the new string.


For example, consider the following string:


  The sky is dark


If I wanted to clear out the following part of the string:


  "sky is "


to leave only:


  The dark


I would need to clear characters 5 - 11 of the original string. This Shared Action will do this for you.




Example of how to call this Shared Action from within your own Actions Script:


 


The Execute Shared Actions line of code has a full Property Editor that you can use to specify the values for the various parameters required by the Shared Action.


To access it:


  1. Select the Execute Shared Actions line of script in your code
  2. Click the Properties button in the Toolbar


The properties dialog will allow you to specify which values will be passed into this Shared Action and which variable will be used to receive the resulting return value.


 


DOWNLOAD INFORMATION

For general information on what a Shared Action is, and how they are used within ToolBook, click here.



ClearChars Shared Action



Created with the Personal Edition of HelpNDoc: Write EPub books for the iPad