Create an Amiga script and run it from shell or within Workbench

Open your favourite editor such as JanoEditor or if using Classic Workbench, right click on the Workbench background and choose new > script
Download JanoEditor or get JanoEditor from Aminet

Lets create a simple script that will exit after 3 seconds
Type the following

Echo This will close after 3 seconds
wait 3 secs
quit

Once you have written your script, save it.

We need to make the script executable, locate the script in Workbench and right-click it and choose “Info”

Now click on the “Protection bits” TAB
Make sure that “Script” and “executable” are both ticked, and then click SAVE
You will be asked to if you want to create an ICON, just click YES, you can change this later.

Your script will now run if you load the shell, navigate to its folder / drawer and run it by name.
This will run the “myscript” script saved to the “RAM drive”.

workbench:>ram:
Ram Disk:>myscript

If you want your script to execute in Workbench when you click on it, do the following.
Right click on the script and choose “Info”, then Under the Information Tab change the Default Tool: to iconX
Press ENTER after typing iconX, then choose SAVE
Now double-click your script and it will run.

Use iconmaster as an easy way to change your scripts icon.
Download Here or get it from aminet

Print Friendly, PDF & Email

More Like This


Categories


Amiga

Tags


  • Post a comment