Navigation:  Click-Script Guide > Custom Actions >

Using Custom Actions

Previous pageReturn to chapter overviewNext page

How to use your custom action:

 

After defining the custom action, you will want to use it in your events. To include your custom action in the event your are editing, just select Click-Script > Insert Action > Custom and then select the custom action you want. The custom actions are included in the event exactly the same way the other actions are included.

 

 

How to create a recursive custom action:

 

If you want to create a recursive custom action, just call the custom action from itself. The following example calculates the factorial:

 

Example: Factorial LongInt ( Number As LongInt )

if  ( %Number% <= 1 )  {
      %Result%  =  (number)  1
}  else  {
      //  Do the recursive call
      Factorial ( Result =  %Tmp% , Number =  %Number% - 1 )
      %Result%  =  (number)  %Number% * %Tmp%
}  end if