By J.L. White

owdy. Welcome to our first installment of Bodacious Bodean's Binary Bakery. With all the strange goings on around the Amiga & NewTek community we decided to breathe a lung full of stabilty into this otherwise shaky situtation. To have a place to go where everybody knows your name, a place to hang out with the cool dudes and dudettes, somewhere to keep informed as to what the heck is going on. We hope you enjoy the magazine, reap the benefits and please show your support by buying products from those developers and dealers that have seen the light and advertised in our new bundle of joy. Ok - enough sappy BS, onto the programming.

This column will try to show you some of the benefits of learning a small bit of programming yourself. This is not designed for those of you who already write your own software - though you are more than welcome to continue reading. It is aimed at those of you who wish that you could get more out of your system by adding some simple little additions that don't take any brain work.

Since the release of the Flyer from NewTek, the Toaster has been opened up to the world of Arexx programming. While earlier versions did have a few Arexx commands, it was not until the Flyer came along that it really got a good shot in the arm. There are now tons of options that can be added and tweaked because of it. Just look at programs such as Control Tower and the Co-Pilot series. These programs really show what can be done when you just sit down and get to the business at hand.

For the next few issues I plan to show you a few of the basics and how easy it is to do them yourself. I don't want to teach you the basics of the Arexx language, you can read the manuals on that yourself. This will be to show you how you can incorporate some of the commands that NewTek has added to the Toaster Flyer and see for yourself how easy it is and perhaps open your imaginations to come up with some original combinations of these on your own.

The first thing you need is some type of text editor. Now don't tell me you do not have one ("I'm just a video editor not a computer geek!"). If you have not purchased a word processor or a commercial text editor you are still in luck. The Amiga comes with a built in editor. While not the best piece of software on the planet, it does get the job done and this is what we will use for our examples. If you decide that you want to do a lot of this type work, I would recommend a program like Cygnus Ed. I live in that program!

First you must open a shell window and type this:

ed test

Ed is the name of the text editor that comes with the Amiga. It is located in the C: directory (this is where many of the shell based commands reside). The word test is a bogus name just to get the program up and running. When you first start the editor you must pass it the name of a file that you plan on editing. From my many years of tech support I have learned that it is much easier to walk someone through this than to tell them to type the following:

ed Toaster:Programs/StartToaster

You would be surprised how many people's fingers get tongue tied when you tell them to type long lines like that over the phone. Since the ed program has a menu option to load a file it is much easier to just type test (or any other bogus word you feel like tying) and get the program running then use the menu to actually choose the file, so once you type ed test in the shell a window will open up on your screen. At the top of the window it will say Ed 2.00 or something similar (depending on the version of Amiga Dos you are using). At the bottom of the window it should say "Creating new file" (this is because we typed in test which does not really exist so it plans to create one), however we are going to load in a file.

The Flyer is started by clicking on an Icon called StartToaster. This is simply an Arexx script that has a number of commands in it to get the Toaster Flyer up and running. In the release of 4.1, NewTek added a few other icons to choose from: one was StartToaster_Proj-Files and another was StartToaster_Files-Files. Many people got confused by these additional files and many of the 3rd party scripts would not work with them (until they got changed). The only difference between these and the original StartToaster is one simple line. That is what we are going to teach you today.

Now back to the Ed program. Go to the first menu in Ed and you will notice an option called "Open...". Select this and a File requester will pop up asking for a filename. We are going to select the StartToaster file. First click on the button at the bottom called "Volumes", next scroll down to the bottom of the list until you see an entry called "Toaster:" then double click on it. This takes you to the NewTek drawer where all your Toaster Flyer files will be found. Next scroll down until you see a drawer called "Programs", make sure it is the drawer and not the Programs.info or Programs.I files, these are icons and croutons. When you click on the drawer, it will take you into another subdirectory of files. Look for the "StartToaster" file in here, click on it, then click "OK"

The StartToaster file will now be loaded into Ed and you should see a bunch of gobbledygook text that you probably have no idea what it means and you really do not need to know for now. The only thing that is really important to remember is that an Arexx script MUST start with "/*". If it does not start with these 2 characters then the system will not recognize it as a valid Arexx script. Anything between those and their matching "*/" characters is considered a comment and not a command, so if you want to put a comment somewhere to remember what a given piece of Aexx code means, just place it in between:

/* This is a comment */

Now when you are in Ed you can use your arrow keys to scroll through the text file. The place you can put commands in is between 2 lines which are:

/* Add Startup Code here... */
/* End of code. */

This section of the script is where we can add all kinds of options to the Toaster. As long as you place your commands here they will not interfere with the rest of the script. The command to change the default view is called Set_View. You have 5 options for this command which are:

Code - View
0 Files/Files
1 Project
2 Project/Files
3 Project/Project
4 Project/Switcher

So if you want your Toaster to startup in Project/Files View you would add the following command line to the script:

call set_view(2)

That is all there is to it. Those two words represent the command needed through Arexx to change the view options. You're invoking the "call set_view" command, and the bit in parentheses is the argument being passed to the "call set_view". In this case, we're passing the argument to set the view to Project/Files. Simple, huh?

Once you have added that line, simply go to the menu and select "Save". The next time you start your Toaster Flyer it should go right into the new view you selected. Experiment around with different code numbers to see what results you get. Now wasn't that easy? All this time you thought programming was just too difficult! Nah - just time-consuming like anything else. I just want to show you a few easy short cuts to give you new options on using your Toaster Flyer system to its fullest.

Remember these steps to edit the file. In the next few issues we will go over how to add different commands to the startup script, then we will go into writing your own scripts. All will be based on editing text files so you need to know how. You have just learned the basics of editing one so remember it. For those of you who own Control Tower we have a macro that can be run from the Flyer Menu called "Edit_Text.rexx". It does the same thing and saves you the step of opening a shell window and typing "ed test". It first comes up with a file requester where you enter the "StartToaster" name and then it loads Ed for you with the StartToaster file loaded in automatically.

As we continue with this column we plan on getting into easy programming steps for both the Toaster Flyer and Lightwave, so if you have any specific questions please feel free to email me and we will see what we can do to add it in. Until next time...


Back To The Table Of Contents
Copyright © 1997 Visual Inspirations