How to Write Your Own Scripts

by Sigrid, Owner of PSPx3



Written for PSP9 for those who have a good knowledge of PSP and how to use scripts.
You should be able to run scripts and know the scripts toolbar and script output palette
A basic knowledge about programming is preferable.

Materials

Any similarity with any other tutorial is purely coincidental

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Foreword

I am sure you have searched the internet for a tutorial about how to write your own scripts in Paint Shop Pro and you came up blank at every turn. That's how I experienced it. It is very hard to find a comprehensible tutorial that shows you how to create your owns scripts and maybe add a loop or define a variable somewhere on the way.

This tutorial is in no way meant to be a full explanation on the scripting language of PSP and all its uses.
It is just meant to give you a starting point and maybe lead you to find out for yourself how to write your own scripts.

You should open some scripts you have in PSP or you have downloaded and begin to analyze them. Try to understand what the script does and how.

Take it slow and don't try to do too much all at once.

When you have finished this tutorial you should be able to create or edit a script and let it interact with the user.

Some useful links

Here are some links to help you in your quest:

And now we begin

Preparations

  1. Make sure your Script Toolbar is visible
    If it is not visible go to View->Toolbars->Script
  2. Make sure your Script Ouput Palette is visible
    If it is not visible go to View->Palettesl->Script Output or press Shift+F3
  3. You can define your favorite text editor for scripting by adding it in the file preferences
    File->Preferences->File Locations->Python Source Editor.
    The default is usually Windows Notepad.
    An Editor that gives you the line and column numbers is preferable.

Follow the links to the different parts of this tutorial:

  1. Part 1 - Python and Other Basic Information
  2. Part 2 - Editing the Script with PSP Script Editor
  3. Part 3 - Using a Text Editor to Edit the Script
  4. Part 4 - Creating a IF and WHILE loop
  5. Part 5 - Some Final Remarks and How to Proceed



~~~~~~~~~~~~~~~~

PSPX3 Tutorial Index

~~~~~~~~~~~~~~~~



This tutorial was written by Sigrid
exclusively for PSP Times Three
Any similarities to other tutorials is merely a coincidence.
~All rights reserved - 2012~