View Categories

Using Custom Scripts

1 min read

To get started with creating your own scripts, we recommend reading through all of the help docs provided in order to get a good understanding of the CoyoteScript language and the various commands available.

Right, now that you know how to write scripts, lets put them to use!

 

1) Creating a script

Open the “Scripting” tab from the left menu pane. You’ll be greeted with a blank editor and a new script called “new 1.cy”.

Write your script, and click Save in the top right of the editor. You can click “Run” to execute your script and test it.

2) Executing your script as a translation

Navigate to the “Translations” tab, and set up your trigger event as normal in the left column.

Expand the translation to show advanced options. In the right column, select “script” from the Action menu.

In the “script” box below, type the full name of your script, for example “new 1.cy”

Alternatively, you can open the Script Hub by clicking the Search icon next to the script selector, and navigate to the ‘Local’ tab to browse your locally created scripts. After selecting a script in the Script Hub, you can click ‘Use’ to use it in the translation.

And that’s it! The script will now run every time that the translation is triggered.