--- title: "Automate Devices with TypeScript Scripting – nnounce" slug: "script" description: "Write scripts in the Deno runtime with snippets, test runs, resources and NPM dependencies." updated: 2026-08-17T09:07:48Z published: 2026-08-17T09:07:48Z canonical: "docs.simpleway.cloud/script" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.simpleway.cloud/llms.txt > Use this file to discover all available pages before exploring further. # Scripting > [!NOTE] > Description > > - Create your own *scripts* to automate your device and its processes. > - With the *snippets* you can choose from a predefined set of scripts. > - The *test run* enables you to verify that your script works as expected. > - In *Resources* are stored files edited by the user. > - The *External Packages* handles files for scripts to function with NPM dependencies. > [!NOTE] > Tip! > > You can create your custom *variables* to enhance the usability of the scripts. > [!TIP] > Scripting Tutorials on GitHub > > Find out more about how to use scripts with nnounce devices on [github](https://github.com/nnounce/scripting-tutorials). ScriptsResourcesExternal Packages ![](https://cdn.document360.io/a3e67867-6316-451b-94ad-ec727ac9102a/Images/Documentation/Scripts_1(1).png) ## Create new script 1. Create a new script by clicking the ***plus+* icon** on the main page. 2. A new window opens, where you can define first of all the script ***Name***. 3. Define your ***Script***: ![](https://cdn.document360.io/a3e67867-6316-451b-94ad-ec727ac9102a/Images/Documentation/image-VXWYUOHZ.png) > [!NOTE] > Tip! > > Use *Snippets* and define your script. | **Snippets button** | Popup with a library of hardcoded codes is opened. You can insert these snippets to the script editor. ![](https://cdn.document360.io/a3e67867-6316-451b-94ad-ec727ac9102a/Images/Documentation/image-FFXIWO9S.png) **TIP!** Explore the snippets categories to find the snippet you need. | | --- | --- | | **Docs button** | Opens a new window with documentation with hints how to create your scripts. *Note*: The documentation was created generically. | 4. Define your script ***Mode***, you can chose from: - Background - should be running with automatic restarts, - Triggered - stopped, can be executed but not right now, - Disabled - script will not be executed. ![](https://cdn.document360.io/a3e67867-6316-451b-94ad-ec727ac9102a/Images/Documentation/image(140).png) 1. Confirm your script configuration with the *Save & exit* button. *Note*: You can create up to five scripts. ## Script test run 1. Use the ***Test run*** button to locally test the inserted script. You will be prompted to save your script if you have not already done so. > [!TIP] > Tip! > > Use the *Stop* button if the script does not end by itself. 2. You will see the progress/result in the ***Console*** below. ***Example of “Play local file” script from the Snippets:*** ![](https://cdn.document360.io/a3e67867-6316-451b-94ad-ec727ac9102a/Images/Documentation/image-ASHZFIMW.png) 1. ***Additional options*** using the icon buttons in the right upper corner of the Console field: | **Word wrap** | Wraps long text onto next line | | --- | --- | | **Download** | Creates a file of the console items | | **Clear all** | Removes the console content | | **Scroll to bottom** | Gets you directly to the end of the list | | **Full screen** | Switches the window to full screen | ![](https://cdn.document360.io/a3e67867-6316-451b-94ad-ec727ac9102a/Images/Documentation/Resources_1.png) ## Manage **files and dependencies used for scripts** The Resources tab provides the ability to manage all files necessary for running your scripts. **Please note that the Import button overwrites the content of the currently opened folder with the imported .ZIP archive.** | **Add folder** | Create a new folder to organize your files. | | --- | --- | | **Import** | Importing new files will override existing files. Zip files are automatically unpacked. | | **Export** | Exports the files in the currently opened folder into a zip file. | ![](https://cdn.document360.io/a3e67867-6316-451b-94ad-ec727ac9102a/Images/Documentation/External_packages_1.png) ## **Use External Packages for your scripts** External Packages store files for scripts to function with NPM dependencies. | **Import** | Importing new files will override existing files. Zip files are automatically unpacked. | | --- | --- | | **Export** | Exports the files in the currently opened folder into a zip file. |