-
Notifications
You must be signed in to change notification settings - Fork 14
Scripting
Pinto! introduced scripting in version b1.2
The scripting engine used is CS-Script, albeit it's quite an old version so it works on .NET Framework 4.0
This article will help you setup a development environment for writing scripts
We are using Notepad++ for writing scripts and this is what the guide will help you setup
There are other alternative code editors supported by CS-Script but those are out of scope of this guide
We are hosting an already configured and ready-to-go portable installation of Notepad++ on our Github, which you can download here
After downloading, extract it (DO NOT RUN IT IN YOUR ARCHIVE SOFTWARE) and run notepad++.exe from the Notepad++ folder
You should now be ready to write your first script
Now that you have your environment ready, it's time to script!
You can find some example scripts here
Here are some notes:
- Pinto! scripts are loaded from %appdata%\Pinto!\scripts
- Most scripts use
//css_reference Pinto.exewhich expects that you have Pinto.exe, Pinto.pdb and Pinto.xml in the same directory as the scripts, so make sure to put those there so Intellisense works - Auto Intellisense is broken, you must use Ctrl + Space when you want to get Intellisense
- After opening your script file, make sure to open the project panel and load it
- It is recommended to download the Pinto! source code to better understand how Pinto! is structured and what features you have available
IPintoScript is an interface that defines your script. Pinto! uses it to call certain events.
If you don't implement it, Pinto! will try to force-cast it to the correct type if you have the required methods
If Pinto! can't do that, your script will not load