Amiga World Official AmigaDOS 2 Companion - eBook-ENG

Page 324

AmigaWorld Official AmigaDOS 2 Companion

LOADWB

Loads and runs the Workbench interface. ENDCLI >NIL:

Ends the original Shell process. If you want to have a Shell active when you boot, you can delete this command.

That's it for our look at the Startup-sequence file. It contains many illustrative examples of how to write scripts — especially of how to deal with potential errors before they occur. Use it as a model of your own scripts, and don't be afraid to modify it. Just remember to rename the original Startup-sequence file to something like Orig-startup before you go with a modified startup.

IconX: Running Scripts From Workbench Command scripts are not limited to AmigaDOS. The IconX (Icon eXecute) command lets you execute a script by double-clicking on an Icon from Work bench. You access IconX from an IconX project. You create such a project by attach ing a .info file to an AmigaDOS script file. See the section "IconEdit: A Practi cal Example" in Chapter 6 to learn how to attach project icons to icon-less files. Once you've created a project icon for your script file, you have to set the Default Tool in the project's Information window to GlconX.

IconX projects can use two Tool Types, DELAY and WINDOW. DELAY=: The DELAY Tool Type lets you enter a number that indicates how much time will elapse between the termination of the script and the closing of its output window. You can use it to keep the window open long enough to see the output of the script. If you enter: DELAY=0

IconX will keep the window open until you enter CTRL-C. The DELAY value isn't in seconds. On my Amiga 3000, a delay of 100 lasted about 3 seconds.

WINDOW=: This Tool Type lets you specify the console device, position, and size of the output window created by IconX. The window information takes the form: console, device/x/y/w/h/title consok.device: Lets you specify the console device to be used for the output window. You should stick to CON:.


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.