Start!

Step1

Step2

Step3

Step4

Step5

Step6

Step7

Step8

Final

Special thanks

Cover


step3: Super easy script

Now let's actually write the script. Now, the time has come for the image data for the sample that was first copied to be useful. A file called HSP3TTL.JPG that was copied when creating the directory. This is a JPEG format image file that contains the title screen of HSP3, but let's display it for the time being.
In the HSP Script Editor, select "New" from the "File" menu to start writing from scratch.
The first line is

picload "HSP3TTL.JPG"
It is
. This is the end. Eh ?? It's over ?? Well, at first it's a super easy script, so please enter this one line.

There are a few things to keep in mind when typing. First, press the TAB key, move the cursor slightly to the right, and then type. This is one of the HSP conventions, and if you put the TAB first, it will come with the benefit of making the script easier to read later, so try to make it a habit. Again,

Let's put TAB first

Remember it well. And after TAB, it ends with a lowercase picload, then the "" (double quotation) "symbol and HSP3TTL.JPG, and again the" "" symbol.

Now let's try what happens with this one line. To actually execute the HSP script, select "Compile + Execute" from the "HSP" menu. This can also be shortcut by pressing F5 on the function key.

Press the F5 key and execute immediately!

After a short while, you should see a new window and a graphic image. If that doesn't happen and you get a dialog that says "Error", you either made a mistake in the line you typed or forgot to copy the necessary files. Please compare and check again.

In this way, HSP scripts allow you to control the operation and work contents of HSP as you like. The task of writing this script is the programming with HSP.

By writing a script, HSP can be transformed into various applications. You have taken that first step.

When you see that the HSP window that came out after executing is displayed as it is, you can close the window anymore. Press the "x" mark close box button or press the alt + F4 key to close it. You should be back in the HSP Script Editor again.

In the same way from now on, the pattern of writing a script and executing it ... will appear many times, so please understand this flow. If you go back to the editor without closing the window after running it, the next time you run it, new windows will be opened more and more and you will run out of memory, so be careful.


  1. Edit the script with the HSP script editor
  2. Press F5 to execute
  3. Execution result is displayed in HSP window
  4. Close HSP window
  5. Return to HSP Script Editor Go back to
  6. 1 and repeat

For the time being, I was able to display the image. But the scripting path has just begun, so let's go further.

ONION software Copyright 1997-2009(c) All rights reserved.