Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Scripting

vlOd edited this page Mar 10, 2024 · 9 revisions

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

⚠️ The Pinto! source code is pretty rough and un-documented, so writing complex scripts requires decent knowledge of C# and programming in general
⚠️ Issues regarding questions about C# itself (not the Pinto! source code) will be closed

Setup

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

Actually scripting

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.exe which 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 image
  • It is recommended to download the Pinto! source code to better understand how Pinto! is structured and what features you have available

IPintoScript

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

Clone this wiki locally