G o H o m e V1.00 Q u i c k S t a r t T u t o r i a l Copyright 1993 Added Dimension Software, Inc. Added Dimension Software, Inc. 6780 Abrams Rd Suite 103-190 Dallas, TX 75231 Phone: (214) 341-5759 CompuServe ID: 73311,1062 _______ ____|__ | (R) --| | |------------------- | ____|__ | Association of | | |_| Shareware |__| o | Professionals -----| | |--------------------- |___|___| MEMBER You should carefully read the following terms and conditions before using this software. Use of this software indicates your acceptance of these terms and conditions. If you do not agree with them, do not use the software. Disclaimer of Warranty THIS SOFTWARE AND THE ACCOMPANYING FILES IS SUPPLIED "AS IS". ADDED DIMENSION SOFTWARE, INC. DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE. ADDED DIMENSION SOFTWARE, INC. ASSUMES NO LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF GOHOME. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH GOHOME MAY BE USED, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE THOROUGHLY TESTED WITH NON- CRITICAL DATA BEFORE RELYING ON IT. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE. Agreement - Shareware Version GoHome is a "shareware program" and is provided at no charge to the user for evaluation. Feel free to share it with your friends, but please do not give it away altered or as part of another system. The essence of "user-supported" software is to provide personal computer users with quality software without high prices, and yet to provide incentive for programmers to continue to develop new products. If you find GoHome to be a useful program and continue to use it after a reasonable trial period (30 days), you must make a registration payment of $50.00 to Added Dimension Software (See "Registering GoHome" below). The $50.00 registration fee will license one copy for use on any one computer at any one time. You must treat this software just like a book. An example is that this software may be used by any number of people and may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another, just as a book cannot be read by two different persons at the same time. Commercial users of GoHome must register and pay for their copies of GoHome within 30 days of first use or their license is withdrawn. Site-License arrangements may be made by contacting Added Dimension Software. Anyone distributing GoHome for any kind of remuneration must first contact Added Dimension Software at the address below for 2 authorization. This authorization will be automatically granted to distributors recognized by the Association of Shareware Professionals as adhering to its guidelines for shareware distributors, and such distributors may begin offering GoHome immediately. However, Added Dimension Software must still be advised so that the distributor can be kept up-to-date with the latest version of the GoHome. For more information see VENDOR.DOC, included on the distribution disk. You are encouraged to pass a copy of GoHome along to your friends and associates for evaluation. Please encourage them to register their copy if they find that they can use it. 3 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 What is GoHome? . . . . . . . . . . . . . . . . . . . . . . 1 1.2 About this Manual . . . . . . . . . . . . . . . . . . . . . 3 1.3 Manual Conventions . . . . . . . . . . . . . . . . . . . . 3 2. Getting Setup . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1 README.GO file . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Packing List - the files you should have . . . . . . . . . 5 2.3 System Requirements . . . . . . . . . . . . . . . . . . . . 6 2.4 Installing GoHome . . . . . . . . . . . . . . . . . . . . . 6 2.5 Getting Help . . . . . . . . . . . . . . . . . . . . . . . 7 3. Using GoHome . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1 Starting GoHome . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Popping Up . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 GoHome's Main Menu . . . . . . . . . . . . . . . . . . . . 10 3.3.1 Using GoSchedule . . . . . . . . . . . . . . . . . . . 10 3.3.2 Using Record Script . . . . . . . . . . . . . . . . . . 12 3.3.3 Using Playback Script . . . . . . . . . . . . . . . . . 13 3.3.4 Script Commands Available When Recording . . . . . . . 14 3.3.5 Using Run a Task . . . . . . . . . . . . . . . . . . . 17 3.3.6 Using DOS Shell . . . . . . . . . . . . . . . . . . . . 18 3.3.7 Using Blank Screen . . . . . . . . . . . . . . . . . . 18 3.3.8 Using Suspend Tasks . . . . . . . . . . . . . . . . . . 19 4. Using the Program Scheduler - GoSched . . . . . . . . . . . . 20 4.1 Starting GoSched . . . . . . . . . . . . . . . . . . . . . 20 4.2 Editing Scripts and Batch Files . . . . . . . . . . . . . . 20 4.3 Moving Tasks Around . . . . . . . . . . . . . . . . . . . . 21 4.4 Getting Help . . . . . . . . . . . . . . . . . . . . . . . 21 5. Using the Script Editor - GoScript . . . . . . . . . . . . . . 22 5.1 Starting GoScript . . . . . . . . . . . . . . . . . . . . . 22 5.2 Example 1 - Typing the Date and Time . . . . . . . . . . . 23 5.3 Example 2 - Writing the Date and Time to a File . . . . . . 27 5.3.1 Script Variables . . . . . . . . . . . . . . . . . . . 27 5.4 Example 2 - Continued . . . . . . . . . . . . . . . . . . . 29 5.5 Example 3 - Viewing the Log File . . . . . . . . . . . . . 31 5.6 Example 4 - Taking a Screen Snapshot . . . . . . . . . . . 34 5.7 Example 5 - Writing a "Macro" Menu . . . . . . . . . . . . 37 6. Using the File Editor - GoEd . . . . . . . . . . . . . . . . . 41 6.1 Starting GoEd . . . . . . . . . . . . . . . . . . . . . . . 41 6.2 Getting Help . . . . . . . . . . . . . . . . . . . . . . . 43 6.3 Changing Colors . . . . . . . . . . . . . . . . . . . . . . 44 7. Appendix A - Business Stuff . . . . . . . . . . . . . . . . . 45 i Contents ii 7.1 The Shareware Concept . . . . . . . . . . . . . . . . . . . 45 7.2 Benefits of Registering . . . . . . . . . . . . . . . . . . 46 7.3 Registering GoHome . . . . . . . . . . . . . . . . . . . . 46 7.4 ASP Ombudsman statement . . . . . . . . . . . . . . . . . . 47 8. Appendix B - Using Configuration Files . . . . . . . . . . . . 48 9. Appendix C - Using /CSET and /PAL . . . . . . . . . . . . . . 49 Chapter 1 Introduction 1.1 What is GoHome? Welcome to GoHome, a suite of integrated tools that work to make you and your computer more productive. With GoHome, you will be able to do a number of things such as: run programs at any time without user intervention, create and run scripts using the built in script interpreter, edit scripts with the unique script editor, use the unique notepad editor that can "pop-up" over other programs, access the DOS prompt even while in the middle of another program, use the built in screen blanker, and more. With GoHome, you will also be able to run ANY program at the press of a couple of keys - even if you are in the middle of running another program! This feature alone, makes GoHome indispensable. For instance, say you're in the middle of editing a document and the phone rings. It's Bill from accounting and he wants to know the current sales figures for this month. You pop-up GoHome and have it run your spreadsheet and load the month's figures for you (GoHome will swap out your editor to free up enough memory for the spreadsheet program and then start up the program and load the proper spreadsheet data). You can then provide Bill with the data he needs and exit the spreadsheet (GoHome will restore your editor to the state it was in just prior to running the spreadsheet). Oops, you forgot to tell Bill that the numbers you gave him didn't include your last big sale. You pop-up GoHome once again and have it run GoEd (GoHome's notepad editor) and load the company's phone list for you. You then search for Bill's name to get his phone number. When you get done talking to Bill, you can get back to work right where you were before he called. Hopefully, you're starting to get an idea of some of the things that GoHome can do for you. The next couple of paragraphs discuss some of these features in a little more detail. Following that is a hands-on tutorial designed to get you using GoHome and incorporated into your daily routine as quick as possible. GoHome's flexible scheduler allows you to schedule a program to run at any time of the day - on any week day, or any day of the month, or just on a specific day of the year. You can also schedule a program to be repeated throughout a portion of the day at minute intervals. For example, you might set up a schedule similar to the following: 1 Start End Repeat When Description --------------------------------------------------------- 1:00a - - M W F S Partial Tape Backup 1:00a - - S Full Tape Backup 10:00a 3:00p 10 mins MTWRF Run network monitor 3:00a - - 1 15 Print out employees checks 9:00a - - 12/01/94 ALARM - Get Christmas presents 11:00p - - T R Update database tables 10:00p - - 8/30/94 Print annual report. 9:00a 4:00p 60 mins MTWRF Get latest stock quotes from BBS GoHome can be taught to run programs that would normally require user intervention by using its powerful scripting language. A "script" is created that lists the steps necessary to run the program. For most scripts, you just run the program as you would normally, GoHome will remember the keystrokes as you type them. If a program takes a varying amount of time to perform a task (i.e. downloading a file from a BBS), GoHome can be instructed to wait until a particular pattern of text appears on the screen (i.e. "Download successful") before continuing. For more complicated tasks, GoHome includes a script editor that makes writing scripts a breeze. Using the script editor, you can have a script do a large number of things such as: type the current date and time, take a snapshot of a portion of the screen, display a menu, perform an if-goto test and branch, run a previously scheduled task, beep, prompt for input, blank the screen, reboot, display a message box, write to a file, print to a printer, and more. You can even use GoHome's powerful features when you are using the computer. Scripts are not limited to running programs unattended. They can also be used as a sort of "super" keyboard macro player/recorder to simplify starting programs, or any task within the program. GoHome also has a "Give me a DOS prompt!" function. For instance, if you're in the middle of a program and want to run another program but you don't want to leave the program you're in (for example, you want to see a directory listing), GoHome can be popped-up and will swap-out the current program and run the program you want. When you're done with that program, just exit it and GoHome will bring you right back to the program you where in! You can also set Reminder messages with GoHome that will alert you at the specified time of important events, like meetings and birthdays. GoHome even has a built-in screen blanker to help keep your monitor safe from "burn-in" and to keep the people who walk into your office from seeing what you're working on. 2 GoHome also comes with a small but powerful editor called GoEd. By using GoEd with GoHome, you can have a pop-up at any time notepad editor that's handy for jotting down notes while in other programs, modifying batch files, creating memos, etc. It also can display text in different colors. 1.2 About this Manual If you're like most people, the last thing you want to do is to read a manual. However, many of the nuances and uses for GoHome are not immediately obvious by just "plowing" straight into the programs. It is, therefore, STRONGLY suggested that you print this manual out (if you haven't already) and take a few minutes to work through the examples. The intent of this manual is to get you up and going in the shortest amount of time. When you're done, you should have a good understanding of what GoHome can do and how it can be used to perform everyday, mundane tasks, automatically. This manual doesn't attempt to explain everything little thing that GoHome can do; for that, refer to the on-line help (see "Getting Help" described later) This manual is written in a tutorial type form. You'll get the most benefit from it if you perform the steps indicated in each example. To make this manual as short as possible, it is assumed that you have a basic understanding of how DOS works and that you can create directories, and execute programs from the DOS prompt. 1.3 Manual Conventions To make this tutorial as easy to understand as possible, the following conventions are used throughout: Example Meaning -------------------------------------------------------------- Angle brackets are used to indicate a specific key or key combination. In this example, the F1 key should be pressed. For this key combination, you would press and hold the ALT key, then press and release the "F" key, then release the ALT key. "dir" When instructed to enter a sequence of keys, a pair of quotation marks may be used to set off the keys. Do not type in the quotation marks. "File|Open" This is used to indicate a menu selection. In this case you would select the top-level menu "File", a drop-down menu would appear containing a menu item named "Open". You would then move the highlight bar to "Open" and hit the enter key. 3 C:> The "C:>" characters are used to represent the DOS prompt, in most cases, your prompt will be different. At times, "GoHome" is used to represent the ENTIRE suite of programs that make up this release. At other times, "GoHome" is used to refer to just the PROGRAM named GoHome - the meaning should be clear based on the context that it's in. You will also see the following used throughout this manual: GoHome, GoSched, GoScript, GoEd, and GoHelp; these refer to the programs GOHOME.EXE, GOSCHED.EXE, GOSCRIPT.EXE, GOED.EXE, and GOHELP.EXE, respectively. 4 Chapter 2 Getting Setup 2.1 README.GO file Before installing GoHome, it's IMPORTANT to read the file README.GO for any last minute information that concerns installing and using GoHome. 2.2 Packing List - the files you should have The complete GoHome evaluation package contains the following files. If any of these files are missing, the package is not complete and is not suitable for distribution to others. The complete package may be obtained directly from Added Dimension Software. File Name Purpose of File --------------------------------------------------------------- README.GO Important last-minute information README.BAT View README.GO using GoEd VENDOR.DOC Information and restrictions for disk vendors, distributors, user groups, and more. REGFORM.TXT Registration information and order form. TUTORIAL.TXT This document GOHOME.EXE GoHome main program GOSCHED.EXE Task scheduler and editor GOSCRIPT.EXE Script editor GOED.EXE File editor GOHELP.EXE Help facility GOHOME.HLP on-line help file for GoHome GOSCHED.HLP on-line help file for GoSched GOSCRIPT.HLP on-line help file for GoScript GOED.HLP on-line help file for GoEd GODEMO.BAT Runs a simple demo of GoHome *DEMO.SCR Script files used in GODEMO TASKS.DAT Sample GoHome task data file. ASCII.TXT Sample text file showing some features of GoEd. EXAMPLE?.SCR Example script files from 5 "Using the Script Editor - GoScript" Chapter. NOTE: These files are in a self-extracting file named, "EXAMPLES.EXE". Type "EXAMPLES" at the DOS prompt to extract them. 2.3 System Requirements GoHome and its utilities require the following: An IBM PC or 100% compatible DOS 3.3 or later Recommended but not required: Extended or Expanded memory (for faster program swapping) Hard Disk Drive 2.4 Installing GoHome Installing GoHome is both simple and straightforward. This section explains the necessary steps. 1. Create a directory on your hard disk that will contain GoHome. For example, to create a directory called GOHOME on your C drive, enter the following at the DOS prompt: C:> MD C:\GOHOME (Do not type in "C:>" above, it is used to indicate that the command is to be typed at the DOS prompt.) 2. Copy all of the files from the distribution disk into the directory you created in step 1. For example, if the distribution disk is in drive A you would type the following: C:> COPY A:*.* C:\GOHOME If you received GoHome in a compressed format, decompress it now using the appropriate decompress program (most likely you will need PKUNZIP.EXE). You may delete the compressed file once it has been decompressed. Make sure to keep a backup before you do. NOTE: It's important to keep *all* the files in one directory. GoHome assumes that the utility programs and help files are all in the same directory. 3. Make sure that the COMSPEC environment variable is set to the path for DOS's COMMAND.COM. This is extremely IMPORTANT and GoHome will NOT run properly if COMSPEC is not set correctly. To check this, enter 6 C:> SET | MORE Look for the word COMSPEC and note the value assigned to it (you may have to hit if the above command displays "more" at the bottom of the screen). You should see a line similar to COMSPEC=C:\DOS\COMMAND.COM If you're using 4DOS you should see a line similar to COMSPEC=c:\4dos\4dos.com; and if you're using NDOS look for COMSPEC=c:\norton\ndos.com. If COMSPEC is not set or it does not contain the correct path, edit your AUTOEXEC.BAT file to include a statement similar to SET COMSPEC=C:\DOS\COMMAND.COM. It is necessary for you to reboot after modifying the COMSPEC variable for your changes to take affect. That is all that is required to begin using GoHome, however, it's suggested that you perform the following steps to have easy access to the GoHome programs. 4. Edit your AUTOEXEC.BAT file to include the directory you created in step 1 to your PATH statement. For example, if your current PATH statement is PATH=C:\DOS;C:\WORD you would modify the statement to include GoHome's directory similar to PATH=C:\DOS;C:\WORD;C:\GOHOME 5. To have GoHome automatically loaded every time you boot the computer, add the following line toward the end of your AUTOEXEC.BAT file: C:\GOHOME\GOHOME.EXE 2.5 Getting Help This manual does NOT provide complete documentation for all the features of the programs. For additional information, refer to the on-line help system; type in "GOHELP" at the DOS prompt (i.e. C:> GOHELP). A menu will be displayed from which you can select the program that you want help on. The GoHelp program can also take a parameter that specifies which program to display help on. For example, entering "GOHELP GOHOME" will display help for GoHome. Enter "GOHELP /?" to see all the parameters that can be used with GoHelp. When GoHelp starts, it will display a table of contents screen. This first topic listed explains how to navigate through the help 7 system. Briefly, use the up and down arrow keys and the page up and page down keys to scroll through the table of contents. When the highlighted line is on the item you want help for, hit to display the help text for that item. In addition to the on-line help systems, most of the programs have context-sensitive help that can be activated at any time by hitting the key. GoHome (the program itself, GOHOME.EXE) does not have any context-sensitive help since doing so would require additional memory that is better used by other programs. 8 Chapter 3 Using GoHome 3.1 Starting GoHome GoHome is a memory-resident program (sometimes referred to as a terminate-and-stay-resident (TSR) program). This means that when you load GoHome, it will run for a second or two and then return to the DOS prompt. It will appear as if it finished running but it is really still loaded in your computer's memory, running in the background. You can now continue to run other programs; when you want, you can have GoHome "pop-up" at any time. 1. If the directory containing GoHome is not in your PATH, change to the directory containing GoHome (i.e. C:> CD GOHOME). 2. GoHome is started by typing "GOHOME" at the DOS prompt. 3. GoHome will display a small sign-on banner and then go resident. (If you have an unregistered version of GoHome, a window will pop-up displaying information on how to register GoHome. You'll have to hit the key to continue. This window is NOT in the registered version. This window is the only thing that is different between the unregistered and the registered version.) Note: GoHome can be removed from memory by using the /U command-line option (i.e. C:> GOHOME /U). 3.2 Popping Up Once GoHome has been started, you can bring up its menu at any time by typing the hot-key. The default hot-key is and may be changed using the /HKEY command line parameter (see GoHome's on-line help for more information and how to change the hot-key). To verify that GoHome is indeed running, invoke GoHome by pressing its hot-key: hold down the key and tap the space bar, then immediately release both keys. A menu should appear centered on you screen. This is GoHome's main menu. 9 3.3 GoHome's Main Menu GoHome's main menu consists of the following menu items: Menu Item Action Performed ----------------------------------------------------------- GoSchedule Invoke the program scheduler (GoSched) Record Script Start recording a script Playback Script Playback a previously recorded script Run a Task Run and scheduled task DOS Shell Bring up a DOS prompt - swapping out the current application if necessary Blank Screen Blank the screen - hit any key to unblank Suspend Tasks Suspend any and all scheduled tasks Working under the belief that an example is worth a thousand words (or is that a picture?), we'll quickly demonstrate each item in GoHome's main menu. 3.3.1 Using GoSchedule As stated previously, GoHome's task scheduler is called, GoSched. GoSched is used to set the start and end times, and the day(s) on which a task should run. It also serves as a sort of "Command Center" for the GoHome programs. As we'll see a little later, the script and file editors can be invoked quite easily in GoSched to edit particular tasks. GoSched can also be used during everyday activities to act as a "Program Menu" to launch and run tasks. To get a better idea of what GoSched can do, let's schedule a simple task to display all of the executable files that have a ".exe", ".com", and ".bat" file extension. 1. If you haven't already, press GoHome's hot-key to display the main menu. 2. Select the first item in the menu, "GoSchedule", by hitting the enter key. 3. If GoHome has been installed correctly, the GoSched program should have started and you should see a number of task edit fields in the top-half of the screen and a list of tasks in the bottom half. For now, we will just enter a simple task (don't worry if you don't understand what all the fields mean, they will be discussed in 4 on page 20. 4. If necessary, press to move to a task that is not currently used. 5. In the "Description" field, type in: Display executable files 6. Hit the key to go to the "Task Type" field. Hit the down arrow key to display a list of task types and then hit the down 10 arrow key twice more to position the highlight line over "Command Line". Select "Command Line" as the task type by pressing the key. 7. Tab to the next field (labeled "Command") and type the following: dir *.exe; dir *.com; dir *.bat A "Command" task can take any command that can be typed at the DOS prompt. Multiple commands may be specified by separating them with a semi-colon (";"). 8. We'll leave the rest of the fields alone. Press the key to save the task to the default task file named "tasks.dat". 9. Hit to exit GoSched. 10. To run the task, bring GoSched up again (hit GoHome's hot-key and then select "GoSchedule" from the menu. At the bottom of the screen there is a small help window that displays the function keys and the action that is performed when one is pressed. From this we see that the key is used to run the task highlighted in the task list (the same one that's displayed in the edit fields). Use , if necessary, to highlight the task just entered. Press to run the task. You will see that this causes GoSched to exit, and shortly after that, a window will "pop-up" centered on your display. This is GoHome's Countdown window. Note that the text you entered in the description field is displayed in the window. GoHome will wait for fifteen seconds before running the task. If you want, you can press to Cancel the task (i.e. don't run it), press "R" to Run it now (i.e. don't wait for fifteen seconds), or press "S" to Snooze which will delay running the task for five minutes. If you press or wait for fifteen seconds, GoHome will run the task which, in this case, just executes three DIR commands. If you want, take some time and try out some different commands. If you want to run a batch file, be sure to set the task type to "Batch File". Also, see what happens when you select "Reminder" as the task type and type in some text in the "Note" ("Command") field. You might also try running a program, such as a word processor, before bringing up GoHome's main menu. When you run a task this time, GoHome will "swap" the program out of memory, run the task, and then "swap" the program back into memory restoring everything just the way it was. (GoHome will also swap out programs that are in "graphics mode"; however, GoHome will not display any menus or windows. It will, instead, beep twice when it is expecting you to make a menu selection or to 11 press a key. You are, so to speak, "flying blind". It will become much easier once you get more familiar with the way GoHome works.) 3.3.2 Using Record Script The next item in GoHome's main menu is "Record Script". Scripts are created to run programs that cannot be run to completion because they are expecting a user to interact with it. GoHome's scripting language and tools can be used to quickly "learn" specific tasks, yet are powerful enough to control complicated procedures. Scripts can also be used as a "Super Macro" program to simplify tasks within any program. In the following example, we will create a simple script to start up an editor (we'll use GoEd, but any editor could be used) and type in our address. You should also be in the directory that contains the GoHome programs. 1. From the DOS prompt, bring up GoHome's main menu (enter the hot-key space) and select the second menu item, "Record Script". 2. GoHome will prompt you to enter the name of the file that you want the script to be saved to. In this case, type in: "LETTER" (without the quotes of course). After entering the file name, hit to continue. If an extension is not given, GoHome will use ".scr". If a path for the file is not specified, GoHome will use the directory that contains the GoHome programs; this will save you from having to type in the path every time a script is run. 3. Once the file name is entered, GoHome will replace the main menu with a menu that displays a number of script commands. The script commands listed in the menu are a subset of those available and are generally the ones used the most. Also notice that the characters "Rec:" are displayed in the top-right corner of the screen. As a default, GoHome will display the current script item that is selected. This is useful to remind you that you are recording a script. You can turn off the status display by using the command line option, "/DBG=N", when GoHome is first started. IMPORTANT: When recording keys, GoHome keeps track of the time interval between keys. For this reason, please read steps 4 through 6 below, before entering the keys; otherwise, there might be long delays between keystrokes. To start GoHome recording keystrokes, select the first menu item, "Keys" (the status display will change to indicate that you are recording keys). 12 4. Type in the following at the DOS prompt: C:> goed letter.doc This will start up GoEd (the file editor). Note that when you're recording keys, GoHome will beep each time you press a key. 5. Now, enter your name and address. (Note that GoEd functions like most other editors). Begin by hitting the key eight times to position the cursor in the middle of the screen. Type your name, then below it enter your address, city, state, and zip code. Then hit enter a couple of times to move down a couple of lines, and type "Dear Sir,". 6. Save the script by bringing up the Recorder menu (use the hot-key; since we're recording, GoHome will display the Recorder menu instead of the main menu) and selecting the last item on the menu, "Save Script". 7. Exit GoEd by pressing , when asked to save to a file, Tab to the "No" button and press . You now have a script that will start up GoEd and type in your address and a greeting without you doing anything! NOTE: If a path is not given on the script to record (or to play), GoHome will create the script file in the same directory that GoHome is in (i.e. the script will be in C:\GOHOME). The next section will explain how to play back scripts. 3.3.3 Using Playback Script The third menu item in GoHome's main menu is "Playback Script" and is used (amazingly enough) to play back script files. You will be prompted for the name of the script file to play, and then the script will be played. To playback the letter script recorded in the last section: 1. Bring up GoHome's main menu 2. Select the third menu item, "Playback Script" 3. the name of the script file to playback. In this case, enter "letter". That's it. Sit back and watch while GoHome enters the keys you typed previously, just as you typed them, even including the pauses between keys! If you made a few typing errors or paused too long between keystrokes, don't worry, we'll see later how GoScript can be used to edit them. 13 It is possible to pause and abort a script while it is being played back. To do so, use the hot-key to bring up GoHome's menu. Since we're playing a script, GoHome displays the playback menu that consists of just two items: Pause and Abort. If you select pause, the script will pause and wait for you to resume playing. You resume playing by, once again, using the hot-key to bring up the playback menu and select the Resume menu item. If the way GoHome "changes" menus reads confusing, rest assured that it will seem straight forward when it's used. The only thing you have to do is remember the hot-key. GoHome will display the menu that is appropriate for the given context. 3.3.4 Script Commands Available When Recording Let's pause here and quickly review the other script commands that can be used when recording a script "interactively". (Note that the commands shown here are just a subset of the total commands allowed by the script language). The following table lists these script commands and a brief description of what they are used for. Script Command Description ---------------------------------------------------------- Keys Record all keystrokes and the time interval between them. WaitKeyBuff Wait until all the keys in the keyboard buffer have been read in by the program currently running. (Note: the program currently running may be the DOS command prompt). Delay Pause play back of the script for a specified number of seconds. WaitAtPos Wait until the specified text appears in a defined section of the display. A time out value may be added using the script editor, GoScript. WaitRelCrs Wait until the specified text appears relative to the current cursor position. A time out value may be added using the script editor. Comment Enter a comment. A comment is used to describe what the script is doing. This description can be anything that you feel is important to remember - it is not used by GoHome. It may also be useful to make notes of script commands that you want to add later in GoScript. Beeper Makes a beeping noise. The type of beep that is made can be changed by modifying it in GoScript. 14 Save Macro Stop recording the script and save it to file. The "WaitAtPos" and "WaitRelCrs" are two very useful commands. Let's explore them in a little more detail. When you first start to automate some of your more repetitive programs, you'll discover that just recording keystrokes is not sufficient. A lot of programs take a varying amount of time to execute (i.e. tape backup programs) or they must wait for an event to occur before continuing (i.e. a communications program will need to wait until a connection is made and a logon prompt is displayed). The "WaitAtPos" command will stop processing script commands until a specified pattern of text appears in a pre- determined area of the screen (which may be the entire screen). The "WaitRelCrs" command is very similar to the "WaitAtPos" command except that the pattern of text must appear in a pre-determined area relative to the current position of the cursor. To demonstrate how these commands work, we'll use a very contrived example. Try to imagine how these commands could be used to write a communications script that would start a communication program, have it dial and connect to a BBS, wait for the logon prompt, enter your name, wait for the password prompt, enter your password, etc. In this example, we will write a useless (but hopefully, instructional) script that will clear the screen, wait for you to enter the characters "dir" in the top-left portion of the screen, type to execute the "dir" command, and then beep twice. 1. From the DOS prompt, bring up the main menu and select "Record Script". 2. Enter "useless" for the name of the file to store the script in (Note: GoHome will append ".scr" for the file's extension). 3. Select "Keys". 4. Type in "cls" and then to clear the screen. 5. Use the hot-key to display the Recorder menu and select "WaitAtPos". You will now be prompted to define the portion of the screen that will be searched. The cursor will change to a "tall" cursor and a short help line is displayed at the top of the screen. Use the arrow keys to move the cursor around. will move the cursor to the first column, will move it to the last column. and move the cursor to the first and last row, respectively. If you hold down the when using the left and right arrow keys, the cursor will move eight characters at a time. For this example, move the cursor near the top-left corner of the screen (the exact location doesn't matter). To "mark" the corner, hit . Now, move the cursor to the middle of the screen and hit again to complete the definition of the 15 search area. If after hitting to mark the first corner, you change your mind and want to reposition the corner, hit , then move to the new position and hit again. Once the search area is defined, GoHome will prompt you to enter the text that it should wait on to appear in the search area. For our example, type in "dir". 6. Bring up the Recorder menu again and select, "Keys". Hit the key. NOTE: You should use "WaitAtPos" when the text will appear in a fixed location. Use "WaitRelCrs" when the text doesn't always appear in the same location but it can be determined by the position of the cursor. An example of this would be the logon prompt in most BBSs (the cursor is on the same line or the line below the logon prompt). 7. Bring up the Recorder menu and select "Beeper". 8. Bring the Recorder menu up again and select "Delay". When prompted for the number of seconds to delay enter 1. 9. Bring up the Recorder menu and select "Beeper". 10. Bring up the Recorder menu and select "Save Script". Now let's play back the script we've just recorded. As the script is played back, keep an eye on the script status window in the top-right corner of the screen. 1. From GoHome's main menu, select "Playback Script". When prompted, type in "useless" for the file name. 2. You should see GoHome type in the "cls" DOS command and the screen should clear. 3. A larger green block should appear on the screen where you defined the search area for "dir". GoHome is now waiting for the three characters in "dir" to appear in the green block. You may have to hit and a few spaces a couple of times to get the cursor inside the block. Once it's inside, type in "dir". Note that the search for "dir" is CASE-SENSITIVE (you may want to try entering DIR to verify this). Once GoHome detects that "dir" is inside the block, it will continue. 4. Recall what you did in step 6 above. GoHome will now type in an key that will cause DOS to display a directory listing. 5. The last couple of things the script does is to beep, pause a second, and then beep again. Hopefully you're beginning to get an idea of how to create your own scripts. There are more examples in the "5 section. 16 3.3.5 Using Run a Task The fourth item in GoHome's main menu is "Run a Task". This item is used to run a task that has been entered into GoSched. When selected, a dialog box prompting for the task number to run is displayed. The number you enter corresponds to the number of the task in GoSched's Task List. Once a number has been entered and the key pressed, GoHome will run the task. If the task doesn't have the "No countdown window" checked (bring up GoSched's "Options" dialog box for the task), the countdown window will be displayed. If you added the "Display executable files" task defined in a previous section, then you can run it by selecting the "Run a Task" menu item in GoHome's main menu. When prompted for the task to run, enter its number in GoSched's task list (probably 2) and then press the key. GoHome will display the countdown dialog, hit to run the task without having to wait for the timer to countdown to zero. Note that it is not necessary to be at the DOS prompt when you run a task. Try this: run another program (i.e. GoEd, or your editor), bring up GoHome's main menu and press the key to select "Run a Task". Enter the task number and . Press again when the countdown window appears. GoHome will temporarily swap out your program to make "room" for the task to run. Once the task completes, GoHome will restore everything just the way it was before the task ran. In this example, you may not be able to see the results of the directory listings because GoHome will restore your program as soon as the last directory command finishes. GoHome has a task option that will pause and wait for you to hit a key whenever it finishes running the task. To have GoHome pause when a task finishes, select the "Pause when done" option in GoSched's "Option" dialog. Briefly, bring up GoHome's main menu, press to run GoSched, select the task to be modified by using the arrow keys to highlight the task in the "Task List", press to pop- up the "Options" dialog, press

to move to the "Pause when done" option, press the space bar to mark or select the option, press to return from the "Options" dialog, then press to exit GoSched, and answer "Yes" when asked to save the changes. That previous sequence reads long but once you get familiar with both GoHome and GoSched it will become straight forward. NOTE: The "Pause when done" option is only used when GoHome must swap out a program in order to run another one. In otherwords, if you're at the DOS prompt and run the task, GoHome will not pause when the task completes. Run the task again and note that GoHome will now pause when the task finishes. This gives you time to see the results of the task. GoHome will wait up to one minute for a key to be pressed. If a key has not been pressed after one minute, GoHome will "press" a key for you and return back to the program that was interrupted. 17 TIP: In addition to entering task numbers in the "Run a Task" window, you can also enter an alphabetic character. When GoHome sees that a character has been entered it will run the task corresponding to the position of the character in the alphabet. For instance, press to run the first task, for the second, ..., for the 26-th task. Note that this method will only work for the first twenty-six tasks. Using an alphabetic character may act as a mnemonic for the task to run. For example, you can assign the fifth task (letter "E") to start you Editor; or assign task 20 (letter "T") to run GoEd and load your "To do" list. 3.3.6 Using DOS Shell The fifth item in GoHome's main menu is the "DOS Shell" command. This command can be used ANY time you need to get to a DOS prompt. GoHome will swap out the current program and run a copy of DOS's command processor (COMMAND.COM). When you are done, type "EXIT" followed by at the DOS prompt and GoHome will return you to the program you where in. It is vital that the environment variable "COMSPEC" be set to the path and name of the command processor you are using. If "COMPSEC" is not set, GoHome may not be able to bring up the DOS prompt. (To set "COMSPEC", add a statement to your AUTOEXEC.BAT file similar to "COMSPEC=C:\DOS\COMMAND.COM"). 3.3.7 Using Blank Screen If the same image is displayed on a screen for a long period of time, it may become permanently "burned into" the display. To help protect your display, GoHome includes a screen blanker. If, after a pre-defined time (the default is five minutes), a key has not been pressed, GoHome will "blank" (or clear) the screen. To restore the screen, just hit any key. The sixth item in GoHome's main menu will "blank" the screen immediately. This is useful if, say, you have some private data on your screen (i.e. you're playing a game) and someone walks into your office. You can blank the screen to keep that person from seeing what you are working on. IMPORTANT: Most screen savers that display an animated image on the screen, will halt whatever program is running (i.e. a tape backup program) when it "kicks" in. This is not desirable if you plan to schedule programs to run unattended. GoHome's screen blanker, while not as "pretty" as other screen savers, will NOT interrupt a program that is running. The program will continue to run even though the screen is blanked. 18 3.3.8 Using Suspend Tasks There may be times when you are using the computer and a scheduled task is due. You can use the "Snooze" feature described in the section "Using GoSchedule" to delay the task. However, you may want to delay all tasks until you finish whatever you may be working on. The seventh and last item in GoHome's main menu is used to do just this. When "Suspend Tasks" is selected, GoHome will not run any tasks until you tell it to resume. Once "Suspend Tasks" has been selected, all items in the main menu, except "Blank Screen" will be disabled and the last item will be changed to "Resume Tasks". To resume running tasks, just select "Resume Tasks" from the menu. IMPORTANT: If you are going to run a "critical" task such as a disk defragmentor, it if very IMPORTANT that you disable GoHome from interrupting it. You may do so by selecting "Suspend Tasks" from the menu. However, a better way is to schedule the task with GoHome (you can still run it manually by using the "Run a Task" command). GoHome will NOT interrupt a scheduled task. Another method that may be used to keep GoHome from interrupting a program is through the "/SUSPEND" command line parameter. Let's say that the program you want to run is called DEFRAG. Create a batch file that contains the following lines. GOHOME /SUSPEND=Y DEFRAG GOHOME /SUSPEND=N The "GOHOME /SUSPEND=Y" line will suspend GoHome from running any tasks, the program will run, and then the line GOHOME /SUSPEND=N" will tell GoHome that it can now run any tasks that are scheduled. 19 Chapter 4 Using the Program Scheduler - GoSched If you have been following along with this tutorial, you probably already have a good idea of how GoSched works. In this section, we will point out some of the more interesting and useful features of GoSched. If you need further information, consult the on-line help for GoSched. 4.1 Starting GoSched GoSched can be started two ways: by selecting "GoSchedule" from GoHome's main menu, and running it from the DOS prompt by typing "GOSCHED". One of GoSched's command line parameters is "/LIST". Using "/LIST" will cause GoSched to display just the Task List and not any of the edit fields (you can toggle displaying the edit fields by pressing the key). You may want to use this parameter to have GoSched act as a "Menu" program that will run the task selected by pressing the key. If GoHome is loaded, GoSched will automatically load the task data file that GoHome is using unless another file is specified on the command line. Any modifications made to the tasks will take effect as soon as the task file is saved (GoSched will inform GoHome of the changes). If the Edit Fields are displayed, press and hold the key and press the up and down arrow keys to move to the next and previous task, respectively. If the Edit Fields are not display, it is not necessary to hold the to move around in the Task List. 4.2 Editing Scripts and Batch Files GoSched provides an easy way to edit tasks that are DOS batch files and GoHome script files. If the task highlighted in the Task List is a batch file, pressing the key will invoke GoEd with the batch file specified in the "File name" field loaded. If the task is a Script, the key will bring up GoScript with the script file specified in the "File name" field loaded. 20 4.3 Moving Tasks Around Use the Cut and Paste functions to move items within the task list. GoSched has a "Clipboard" buffer that saves the last item that was Cut. The Paste function copies the contents of this Clipboard into the task position that is highlighted in the "Task List". For example, to move the 4-th item in the "Task List" to the 10-th position, first use the arrow keys to position the highlight bar over the 4-th item in the "Task List". Then use the key to "Cut" this item to the Clipboard. Now, move to highlight over the 10-th item and press the key to "Paste" the contents of the Clipboard into the 10-th item. If you want to "Copy" the contents of an item, simply use to Cut followed by to paste the item back. Now you can move to the position in the Task List that you want to copy it to. 4.4 Getting Help Context sensitive help is available at any time by hitting the key. The key will bring up the help system with the topic set to describe the edit field that the cursor is currently in. If you need help on how to use the help system, press the key for a list of Topics while in the help system. Use the arrow keys to scroll up to the first topic "Using Help" and press to expand or read the topic. 21 Chapter 5 Using the Script Editor - GoScript Most of the time you will create a script using the "Record Script" option in GoHome's main menu. Once the script is recorded, you may need to edit it to add additional functionality or modify the data that was recorded. The scripts are stored in a "compiled" format. What this means is that you will not be able to view and edit the scripts using a text editor. GoHome comes with a program that is used to create and edit these scripts. The program is named GOSCRIPT.EXE (referred to here as GoScript). GoScript was designed to make the process of creating and editing script files as easy as possible. For the most part, it is not necessary to memorize all the commands and their parameters. (If you're familiar with the scripts that most communication programs use, you'll know how hard it is to remember the proper "syntax" for all the commands. This is especially true since most users tend to write scripts only occasionally). GoScript uses menus and dialog boxes to prompt for all commands and parameters. This approach to script file editing makes it easy for first-time users to immediately begin editing scripts. Most users tend to create a lot of scripts initially and will go a few weeks or more before they have to create or edit another script. GoScript was designed with these ideas in mind so that it is as simple to use as possible. In this section of the tutorial, we will create a number of scripts that you will be able to use everyday. We start off with a simple script to enter the time and date into a document and finish with a script that uses a menu and a text file to keep important facts and information at your finger tips. So let's get started! 5.1 Starting GoScript GoScript is started at the DOS prompt by entering "GOSCRIPT" followed by the name of the script file to edit. If the specified script file is not found, GoScript will create a new script file with the name given. For example, to create a new script file called "DATE.SCR" enter the following at the DOS prompt. C:> GOSCRIPT date 22 GoScript always assumes a file extension of ".scr". In the example just given, GoScript will actually create a file named "DATE.SCR". 5.2 Example 1 - Typing the Date and Time Let's start off will a simple script to insert the date and time into a document. We'll call this script "DATETIME.SCR", so start GoScript as follows C:> GOSCRIPT DATETIME NOTE: If you're not in the GoHome directory, you must type the complete path for the script file. GoScript will start up and display a notice window indicating that the script file specified was no found. Press the key and GoScript will create a new script named "DATETIME.SCR". You might want to pause here and examine the items in the menu bar. To access a menu, press and hold the key followed by the highlighted letter of the menu bar. For example, to display the File menu, press and hold the key, then press the key, then release both keys. The up and down arrow keys move the menu's highlight bar; the left and right arrow keys move to the previous and next menu, respectively. The first script command we want to add is the Date command. To add a script command, display the "Add" menu (press ) then use the arrow keys to position the highlight bar over the "Misc" item. The arrow head to the right of "Misc" indicates that there is a sub-menu associated with this menu item. Press to display the "Misc" sub-menu. From this sub-menu, select the "DateStamp" menu item. The "Date Edit" dialog box will display. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Date Edit ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º º º Enter the date format string W m D, Y Ü º º ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß º º Copy to Keyboard Ü OK Ü Cancel Ü º º ßßßßßßßßßßßßßßßßßßßß ßßßßßßßßßß ßßßßßßßßßß º º The following characters have special meaning º º W -> Week day (ie sun, mon, etc.) º º M -> Month as digits º º m -> Month as 3 letter abbrev. º º D -> Day as digits. º º Y -> Year as 4 digits º º y -> Year as 2 digits º º $ -> To print the special characters above. º º any other char is passed through. º º For example, º º W m D, y => Tue Mar 19, 1993 º º M-D-y => 03-19-93 º º Toda$y is m D, Y => Today is Mar 19, 1994 º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ 23 GoScript allows for a number of different date formats. The first edit field, "Enter the date format string", is used to specify how the date should be displayed. The text below the edit fields show what characters to use when specifying the date format. In this example, we want the date to appear in mm/dd/yy format (i.e. 03/19/94). Therefore, we would enter "M/D/y" in the date format field. When GoHome plays this script, it will substitute the actual month, day, and year in place of the "M" "D" and, "y" characters. Note that any characters other than "W" "m" "M" "D" "Y" and "y" will be displayed normally. If you prefer the date to use dashes instead of slashes, type in "M-D-y". Once the date format is entered, hit to accept the changes and dismiss the dialog box (hitting enter in a dialog box will execute the default push button, in most cases this will be the "OK" button). GoScript will insert the Date command into the script. You should see a line similar to DateStamp+| Sat 03/19/94 (example format) to Keyboard NOTE: GoScript displays a plus sign (+) after the command name whenever a detail edit dialog box is available for that command. To display the dialog box, select "Detail..." from the menu bar or press . GoScript displays the name of the script command in the left column (i.e. DateStamp) and the commands parameters to its right. For the DateStamp command, GoScript displays a sample of what the date format will produce. The "to Keyboard" at the end of the line, indicates that the date will be placed into the keyboard's buffer. Placing the result in the keyboard's buffer tells GoHome that you want it to simulate typing the date. Let's stop here and verify that this script will result in the current date being typed. Save the script by pressing "" to display the "File" menu, and select "Save". A short cut for saving the file is to press the key. Now, exit GoScript by selecting "Exit" from the "File" menu or just hit the key. You should now be back at the DOS prompt. GOHOME.EXE must be loaded in memory before any script files can be played back; so if it is not loaded, load it now. To play the DATETIME.SCR script, pop-up GoHome's main menu and select "Playback Script". Enter "DATETIME" for the script to playback. GoHome will run the script and it will type in the current date at the DOS prompt. Verify that, indeed, the current date was typed in the same format that was specified. You should see something similar to C:\GOHOME> Sat 03/19/94 (Your date will, of course, be different.) 24 OK, so far so good. Run GoScript again with the DATETIME file. This time we'll have the string "Date: " appear before the actual date. To do this, we'll use the Keys command. This command is one of the most used script commands because it instructs GoHome to simulate typing all the characters that we tell it to. If the current line indicator (the triangular arrow character in the first column) is not already positioned at the first line, move it there. Select "Add|Keys". The Keys detail edit dialog box will appear. Type "Date: " into the "Keys" edit field. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍKey Edit ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º º º Keys Date:úúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúÜ º º ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß º º Delay Interval none Ü Default Interval 3Ü º º ßßßßßßßßßßßßßßßßßßßßßß ßßßßßßßßßßßßßßßßßßß º º OK Ü Cancel Ü º º ßßßßßßßßßß ßßßßßßßßßß º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ The "Delay Interval" field displays the time interval between the current key in the "Keys" field and the character immediately to its right. The time interval is measured in "ticks" where 1 tick is 1/18 of a second. When a script is played back, GoHome will "type" a key and then pause for the indicated time interval before "typing" the next key. The "Default Interval" field is used to set the time interval for all new keys that are entered in the "Keys" field. The default value for this field is 1 ticks. Once "Date: " has been entered, press to accept and dismiss the dialog box. NOTE: If GoHome's "Record Script" option was used to record key presses, they could be edited in GoScript using this same process. Press the down arrow key to move just below the DateStamp command. Follow the same procedure to add another Keys command to the script but instead of entering "Date: " in the Keys field, type in " at ". Let's add one more item to the script - a time stamp. Press the down arrow key to move the current line indicator to the "End of Script" (just below the last Keys command). Select the "Add|Misc|TimeStamp" option from the menu bar. The TimeStamp dialog box will be displayed. 25 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Time Edit ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º º º Ú Time Format ÄÄ¿Ü Ú Time Modifier ÄÄÄÄÄÄ¿Ü º º ³ ( ) HH ³Û ³ ( ) 12 hour ³Û º º ³ (.) HH:MM ³Û ³ (.) 12 hour AM/PM ³Û º º ³ ( ) HH:MM:SS ³Û ³ ( ) 24 hour ³Û º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ º º ßßßßßßßßßßßßßßßßß ßßßßßßßßßßßßßßßßßßßßßßß º º Copy to Keyboard Ü º º ßßßßßßßßßßßßßßßßßßßß º º º º OK Ü Cancel Ü º º ßßßßßßßßßß ßßßßßßßßßß º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ This dialog box allows the time format to be selected. The default format is "HH:MM" with hours displayed in 12 hour format and am/pm indicated (i.e. 1:31 pm). Let's just use the default format. Hit to accept and dismiss the dialog box. The completed script is shown below. 1. Keys ³Date: 2. DateStamp ³03/19/94 (example format) to Keyboard 3. Keys +³ at 4. TimeStamp ³HH:MM am/pm to Keyboard 5. ³ << End Of Script >> Once again, save the script and exit GoScript. Use GoHome to run the script and verify that it types in something similar to Date: 03/19/94 at 1:23 pm The preceding may read long but once you are familiar with GoScript you'll be able to create scripts in very little time. GoScript makes it easy because it doesn't require you to remember the command names and the parameters that go with it. In other words, GoScript won't allow you to make any mistakes when editing a script. There wouldn't be much point in writing a script to type in the date and time at the DOS prompt. As it turns out, we can use this script to insert the date and time into any program we happen to use. To try this, start up GoEd C:\GOHOME> GOED TEST.TXT Now play back the script again. GoHome will insert the date and time into the editor, just as if you typed it in! Try running the script with your word processor to verify that it indeed works. (GoHome has been tested with a number of applications, it is possible, however, that one of your applications is incompatible with the way GoHome enters the keystrokes. If this is the case, please contact Added Dimension Software and tell us what program you are having problems with). 26 If this script is something that you'll use often, you can save yourself from having to type in the name of the script file every time you run it by adding a task to GoSched that will run the script. The script can then be executed by popping GoHome up, hitting to run a task, and typing in the number of the task. To add the DATETIME script to GoSched: 1. Run GoSched by selecting "GoSchedule" from GoHome's main menu. 2. Go to a task that is not being used. 3. Enter a description (if you want, it's not necessary). 4. Select "Script File" from the Task Type drop-down list. 5. Enter the complete path and name of the script file (i.e. \GOHOME\DATETIME.SCR) in the "File Name" edit field. 6. Press O to bring up the "Options" dialog box. Remove the check mark in the "Start Script at DOS prompt" field (use the space bar to toggle check marks). Place a check mark in the "No countdown window". 7. Press to save the file and then to exit GoSched. 5.3 Example 2 - Writing the Date and Time to a File In this example, we'll modify the script created in Example 1 to write the date/time stamp to a file. Generally, the script presented here would be part of a larger script. For example, say you have a script that dials into a BBS and captures to a file the latest stock quotes. Before dialing, you may want to write a small section header to the capture file that contains the date and time the call was made. This script will write out the following two lines to a file named C:\STCKQTES.TXT +++++++++++++++++++++++++++++++++++++++ Stock Quotes current as of: 03/19/94 at 1:00 am Before we discuss the steps necessary to create this script, we need to first discuss GoScript's program variables. 5.3.1 Script Variables GoHome uses five program variables. A program variable is used to store a specific piece of data. Depending on the variable, the data may be numeric or a text string. Two of the variables contain numeric values that are set and maintained by GoHome, the other three variables contain text strings that can be modified by the 27 script in any manner it sees fit. These text string variables can be extremely useful when writing scripts as we'll soon see. The following table lists the names and purposes of these variables. Variable Purpose ---------------------------------------------------------- Result Set to "OK", "Not OK", or "Timed Out" depending on whether the last script command was successful, not successful, or timed out, respectively. MenuItemSel Contains the last menu item selected from a DoMenu script command. Valid values are "None" if user canceled menu (i.e. hit ESC key), and 1, 2, ..., 9. StringA These are general purpose string StringB variables. Each may contain up to 80 StringC characters. Any strings that are copied to these variables may contain an embedded macro. An embedded macro is either another string variable or an environment variable. These macros are denoted by prefacing them with percent signs ("%'). For example, if StringA contains the string "Hello", and there's an environment variable "COMSPEC" that contains "C:\COMMAND.COM" then the following strings would be expanded as shown. "%StringA, World!" => "Hello, World!" "Say %StringA to all" => "Say Hello to all" "Comspec is %comspec => "Comspec is C:\COMMAND.COM" GoHome also allows the following macro characters to be used within strings: %CR Carriage return character %NL New-line character %CN Both carriage return and new-line characters %FF Form-feed character %TB Tab character %#n Character represented by ASCII number, "n" These macros are especially useful when writing strings to the printer or a file. For example, the following could be used to send the contents of StringA to a file or printer: "%stringa%CN" All the variables and macro characters are case insensitive. In this example script, we'll use script variables to construct the date/time stamp line. It's important that you followed (or at least read) Example 1 and understand Script Variables before trying to follow this example. 28 5.4 Example 2 - Continued Since this script is similar to the script created in Example 1, we'll use that script to get us going. So, copy that script to another file and call it DT2FILE.SCR (to copy the file, type "COPY DATETIME.SCR DT2FILE.SCR" at the DOS prompt). Start GoScript with the new script file: C:\GOHOME> GOSCRIPT DT2FILE It's a good idea to make a note of what a script does, so when we happen to look at it later, it'll jog our memory. GoScript has a script command, "Comment", that allows us to do just that. Note that it's not really a "command" in the sense that it doesn't actually do anything. Let's add a Comment as the first line in the script. To do this, select "Add|Comment". A Comment command will be entered into the script. Note that this command doesn't have a detail edit dialog box; we can type in the comment directly into the edit field displayed next to the command name. Type in the following for the comment: "This script writes the current date and time to a file." We don't need the two Keys command, so delete them by selecting "Edit|Delete Line" or just press the key. Move to the DateStamp line and select the "Detail..." option in the menu bar (press ). In the detail edit dialog box for the DateStamp, TAB to the field labeled "Copy to". Press the down arrow key to display the menu, select "StringA", and then hit . Accept and dismiss the dialog box by tabbing to the "OK" button and hitting . Follow the same procedure for the TimeStamp command but select "StringB" in the "Copy to" field. Move to the line following the TimeStamp command and select "Add|Copy". This will display the "Copy" dialog box. The Copy command is very versatile. It allows for the values of script variables, text strings, and environment variables to be copied to a script variable, typed automatically at the keyboard, copied to an environment variable, copied to a file, displayed on the screen, or sent to a printer. You indicate what to copy "From" and "To" by selecting the proper radio button in the Copy dialog box. For this Copy command, we want to copy a string of plus signs to a file. These plus signs help us to find the start of a section (i.e. beginning of stock quotes for the current day). Press the down arrow key to move to the "String" field in the "From" group box. Press the space bar to toggle the radio button. Next, hit twice to move to the edit field to the right of the "String" radio button and type in a number of plus (+) signs and then type in "%CN". 29 We want to copy this string to a file named, "STCKQTES.TXT". To do this, press to move to the "File" radio button in the "From" group box. Press the space bar to toggle the radio button. Press twice to move to the field that is just to the right of "File" and type, "STCKQTES.TXT". The dialog box should look like ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Copy ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º º º Ú From ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿Ü º º ³( ) Variable String A ³Û º º ³(.) String ++++++++++++++++++%CN ³Û º º ³( ) Environment Variable ³Û º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ º º ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß º º Ú To ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿Ü º º ³( ) Variable String A ³Û º º ³( ) Keyboard ³Û º º ³( ) Environment Table ³Û º º ³(.) File c:\\stckqtes.txtúúúú ³Û º º ³( ) Display row= col= ³Û º º ³( ) Printer ³Û º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ º º ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß º º OK Ü Cancel Ü º º ßßßßßßßßßß ßßßßßßßßßß º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ Press (OK Button) to accept the changes and dismiss the dialog box. Add another "Copy" command just below the one just entered. Follow the same procedure but type the following into the String edit field. Stock Quotes current as of: %StringA at %StringB %CN When GoHome plays this script, it will substitute the values contained in variables StringA (the DateStamp) and StringB (the TimeStamp) in place of "%StringA" and "%StringB", respectively. It will also replace "%CN" with carriage-return and new-line characters. The carriage-return and new-line characters are necessary to mark the end of a line in a text file. Save the script file by selecting "File|Save". The completed script should look similar to 1. Comment ³This script writes the current date and time to a file. 2. DateStamp ³03/19/94 (example format) to String A 3. TimeStamp ³HH:MM am/pm to String B 4. Copy ³"++++++++++++++++++++++%CN" to file C:\stckqtes 5. Copy +³"Stock Quotes current as of: %StringA at %StringB%CN" to file 6. ³ << End Of Script >> 30 NOTE: The text displayed in the DateStamp Parameter field will be different. Hopefully you're starting to understand how to add commands to a script and edit the command's parameters. So that we don't bore you any more with all the little details the previous examples went through, the following examples will just list the script file and touch on a few of the more important points. 5.5 Example 3 - Viewing the Log File The script in this example will display the contents of the log file. Recall that the name of the log file depends on the current month and year. If today is March 19, 1994, the log file would be named GO_03-94.LOG. We'll use GoHome's string and date handling abilities to create the log file name and then start up GoEd to display the log file. Let's also assume that we want GoEd to exit if a key is not pressed within 30 seconds. If a key is entered, then we'll terminate the script and let the user exit GoEd manually. Example 3 Script (line numbers added to facilitate discussion): 1. Comment ³ ** View the current GoHome log file ** 2. DateStamp ³ 11-94 (example format) to String A 3. Copy ³ "C:\GOHOME\GO_%stringa.log" to String B 4. Copy ³ "GOED %stringb %CR" to Keyboard 5. Delay ³ 0 minutes 5 seconds 6. GetKey ³ timeout=30 7. IfGoto ³ if Result is Not Equal to/than Timed out then goto END 8. Comment ³ ** We timed-out before a key was entered, exit app ** 9. Keys ³ 10. Label ³ END 11. ³ << End Of Script >> Example 3 script line by line: 1. The first line in the script is a comment to let us know what the script does. 2. Lines 2 and 3 construct the name of the log file. The DateStamp command is used to form the date part of the name. In the detail dialog box, enter "M-y" in the "Enter the date format string" field. Make sure that StringA is selected in the "Copy To" drop-down field. 3. Line 3 uses the Copy command to append the path and starting characters to the date string stored in StringA (GoHome will replace %stringa with the data stored in the script variable, StringA). This new string is stored in variable, StringB. 31 Select the "String" radio button and enter "C:\GOHOME\GO_%StringA" into the field to its right. Then select the "Variable" field in the "To" group box and select StringB from the drop down list beside it. 4. Line 4 will start GoEd (we're assuming that GOED.EXE is in your PATH statement) with the log file loaded. We again use the Copy command to create a new string that adds "GOED" to the front of the log file and the carriage-return character (uses %CR macro) to the end. The carriage-return character acts the same way that the key does. This new string is then copied to the keyboard, which will simulate "typing" the characters from the keyboard. You may have noticed that lines 3 and 4 could easily be combined into one Copy command such as: Copy ³GOED C:\GOHOME\GO_%stringa.log %CR to Keyboard This has the same effect and is easier to understand than the two step method presented in the listing. The method in the listing was used to show how multiple script variables can be used to append strings. 5. Line five delays (or pauses) playing the script for 5 seconds. This is necessary in order to give GOED enough time to start up and load the log file. 6. Line 6 uses the GetKey command ("Add|Misc Keys|GeKey") to wait for a key to be entered. A time out value of 30 seconds is used. If a key is not pressed within 30 seconds, GetKey will set the script variable, "Result", to "TimedOut" and return. If you don't want to have GetKey time out, set the time out value to 0 seconds. It is important to note that GetKey will not allow the current application to run while it is waiting for a key to be entered. If we didn't use the Delay command in line 5, GoEd would not be able to finish loading the log file because GetKey pauses or halts the application. Delay, on the other hand, does not pause the application and, therefore, GoEd is able to load the file while the Delay command is active. 7. Line 7 uses the IfGoto command to determine if the GetKey command timed out. If it did, then we want to exit GoEd and return to the DOS prompt. If a key was entered, we want to terminate the script without exiting GoEd. The IfGoto command should be used any time its necessary to skip some commands based on some value of a script variable. The IfGoto command uses four parameters: the script variable to test, the value to compare the script variable against, the test condition to be met, and a label to go to if the test is successful. The script variable can be any one of the five: Result, MenuItemSel, StringA, StringB, or StringC (see section "Script Variables" for additional details). 32 The test condition depends on the variable selected. Generally, you can test if the script variable is equal to or not equal to a specified value. The value, like the test condition, depends on the variable selected. If the variable is Result, then value can be either OK, meaning that the last command completed successfully, Not OK if command didn't execute correctly, or Timed Out. If the variable is Menu Item Sel, then value can be a number between 1 and 9 or None. For any of the string variables, value can be any other string variable, an empty or blank string, or any text you type into the value edit field (the value field is both a drop-down list and an edit field when the variable is one of the string variables). A label in GoScript defines a location in the script (if you're familiar with DOS batch files, a label in GoScript is similar to a label in a batch file). Each label is assigned a unique name. Labels are added to a script by selecting "Add|Label". The IfGoto command must be supplied with a label to jump or goto when the test is met. The IfGoto detail dialog box allows for labels to be assigned in two ways: by typing the name of the label into the Label edit field, or pressing the "Labels..." button () to invoke the label maintenance dialog box and selecting a label from there. For this example, select "Result" for the variable, "Not Equal" for the test condition, "Timed out" for the value, and enter "END" in the Label field. The figure below shows how the IfGoto dialog box should appear. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ If Goto ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º º º Variable: Test Condition: Value: º º If Result Ü Not Equal Ü Timed outÜ º º ßßßßßßßßßßßßßßßßßß ßßßßßßßßßßßßßßßß ßßßßßßßßßß º º then goto Label END Ü Labels... Ü º º ßßßßßßßßßßßßßßßßß ßßßßßßßßßßß º º º º OK Ü Cancel Ü º º ßßßßßßßßßß ßßßßßßßßßß º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ 8. Line 8 is a comment. 9. Line 9 will be executed ONLY if the test condition in the IfGoto command is NOT met. In this case, line 9 will be executed only if the GetKey command happened to time out. When this happens, we want to exit GoEd. This is normally done by pressing or . To have GoHome do it for us, we must use the Keys command. After the Keys command has been added, its detail dialog box will appear. Because GoScript uses key combinations to move the cursor to edit fields or to invoke a menu, we must tell GoScript to temporarily ignore any of its normal edit keys. We can do this by pressing 33 (press and hold the key, then press ). Now, any key we press will be accepted as a key for the Keys field and not as a GoScript edit key. This same procedure must also be used to enter the arrow keys, function keys, Home, End, Delete, etc. Once has been pressed, press the key combination that makes GoEd quit, (or press ). Then, to get back into normal edit mode, press again. 10. The last command in this script is a label or position marker. This is the same label that was used in the IfGoto command. When the Label is added ("Add|Label"), the Label Maintenance dialog box is displayed. This dialog displays a list of labels that have been used in IfGoto and Goto commands but have not been added to the script. To select a label from the list, use the up and down arrow keys to select the label, then, push the "Use" button (U). To add a new label to the list, push the "Add" button. If a label is not referenced in the script, a dash (-) will appear to its left. For this example, press to use "END" as our label name. ÉÍÍÍÍÍÍÍÍÍÍÍÍ Label Maintenance ÍÍÍÍÍÍÍÍÍÍÍ» º º º ÚÄÄÄÄÄÄ Label ÄÄÄÄÄÄ¿ º º ³- END ² Add... Ü º º ³ ² ßßßßßßßßßß º º ³ ² Remove Ü º º ³ ² ßßßßßßßßßß º º ³ ² Use Ü º º ³ ² ßßßßßßßßßß º º ³ ² Done Ü º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ßßßßßßßßßß º º -: label not in script º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ Note: A similar script could also be used to delete the log file at the end of each month. 5.6 Example 4 - Taking a Screen Snapshot This script is very useful to help copy portions of a screen to a file. In fact, all the screen shots in this document were captured using this script. This script uses only two commands. The GetArgument command prompts for a file name to save the screen snapshot to, and the TaskSnapshot command saves a portion of the screen to that file. The script is shown below. 34 1. Comment ³Save a portion of the image to a file 2. GetArgument ³ArgNumber=1 Prompt=Save to file t.o.=0 copy to String A 3. TakeSnapshot³r= 1 c= 1 w=80 h=25 attrs=0 i=1 file=%stringa 4. ³ << End Of Script >> 1. A comment telling us what the script does. 2. The GetArgument command requires that four parameters be specified. The first parameter is the argument number. An argument may be specified on the same line as the script file. For example, if a script is named MYSCRIPT.SCR, we could enter the following line when a script file is specified (from GoHome's "Playback Script" or when a script is scheduled in GoSched) MYSCRIPT.SCR JOHN SMITH, TEXAS ArgNumber 0 always refers to the name of the script file. All other arguments must be comma separated text strings. Therefore, argument number 1 is "JOHN SMITH", and argument number 2 is "TEXAS". If we were to ask for argument number 5, GoHome would first check to see if at least five arguments were specified with the script file, if not, it would pop-up a small dialog box and prompt for the argument. The second parameter of the Argument command is for the prompt to display in the dialog box that is used to get the argument. The dialog box is only used when the argument is not specified along with the script file name. The third parameter is used to specify a time out value. Like all time out values, this is specified in seconds and a 0 second value is interpreted to mean "do not time out". The fourth and final parameter specifies where the argument is to go: the keyboard or one of the String variables. For this script, add an Argument command with an argument number equal to 1, for the prompt enter "Save to file", select StringA in the copy to field, and set the time out value to 0. The Argument detail dialog should appear as shown below. 35 ÉÍÍÍÍÍÍÍÍÍÍÍ Get Argument ÍÍÍÍÍÍÍÍÍÍÍÍÍ» º º º Argument Number 1ú Ü º º ßßßßßßßßßßßßßßßßßßßßß º º Prompt Save to file Ü º º ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß º º Copy to String A Ü º º ßßßßßßßßßßßßßßßßßßßß º º Timeout 0 Ü º º ßßßßßßßßßßßßßßßß º º º º OK Ü Cancel Ü º º ßßßßßßßßßß ßßßßßßßßßß º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ 3. TakeSnapshot is the third and last command in this script. It is used to save a portion of the screen to a file. TakeSnapshot requires seven parameters. You specify the top-most row, left-most column, width, and height for the section of the screen that should be saved, whether to save the video attributes (i.e. colors), allow the section of the screen to be selected interactively, and the name of the file to save the screen to. TakeSnapshot doesn't have a detail dialog box because the parameters can be entered next to the command. Rows (r) range from 1 to the number of lines on the screen, typically 25. Columns (c) range from 1 to the number of columns that can be displayed, usually 80. The width and height are denoted on the edit line by a "w" and "h" respectively. If attributes are to be saved, enter a 1 the attrs field; to save just the text, enter 0. Similarly, enter a 1 in the "i" (or interactive) field to allow the user to designate the portion of the screen interactively. Finally, the file field is for the file name which accepts a string variable or a specific file name. For this example, add a TakeSnapshot command ("Add|Misc|TakeSnapshot"). Since we want to select the region interactively, we can just leave the r, c, w, and h fields as they are (they are used only for non- interactive regions). Enter a 0 in the "attrs" field and a 1 in the "i" field. Since we've prompted for the file name with the Argument command and saved it in the StringA variable, specify %StringA for the file name. That's it. You now have a way to "cut-n-paste" text between applications. One more thing needs to be mentioned before moving on. TakeSnapshot has a compliment command called PutSnapshot. PutSnapshot displays the screen saved with TakeSnapshot. PutSnapshot takes just one parameter, the name of the file to display. PutSnapshot knows where to place the image because TakeSnapshot saves the row, column, width, height and video attribute data as the first 6 characters of the file. If you are capturing date to be copied into a word processor, you'll need to delete these six characters using the word processor. 36 5.7 Example 5 - Writing a "Macro" Menu In this example, we create a menu that can be used to initiate a number of functions. When this script is run, a menu will pop-up and perform the action corresponding to the menu item selected. The following table lists the menu items and their actions that this script implements. Menu Item Action --------------------------------------------------- Name Type "Added Dimension Software" Address Type an address Today's Date Type the current date similar to "Sat Mar 19, 1994 Start Editor Type in "GOED" (must be at DOS prompt) Run Task 1 Run the first task in GoSched's Task List sDate/Time Stamp Execute the script, "DATETIME.SCR" Let's look at the script first, and then we'll discuss it (if you installed the example scripts, this is script "EXAMPLE5.SCR". 37 1. Comment ³** This script uses a menu to playback keyboard macros" 2. Comment ³ 3. KeySpeed ³ 0 timer ticks 4. DoMenu ³ Macro Menu t.o.=0 5. IfGoto ³if Menu Item Sel is Equal to/than None then goto END 6. IfGoto ³if Menu Item Sel is Greater to/than 1 then goto Try 2 7. Keys ³Added Dimension Software 8. Goto ³END 9. Label ³Try 2 10. IfGoto ³if Menu Item Sel is Greater to/than 2 then goto Try 3 11. Keys ³6780 Abrams. Rd.Suite 103-190Dallas, 12. Keys ³TX 75231 (214) 341-5759 13. Goto ³END 14. Label ³Try 3 15. IfGoto ³if Menu Item Sel is Greater to/than 3 then goto Try 4 16. DateStamp ³Thr Jan 20, 1994 (example format) to Keyboard 17. Goto ³END 18. Label ³Try 4 19. IfGoto ³if Menu Item Sel is Greater to/than 4 then goto Try 5 20. Comment ³NOTE: The following Keys statement assumes you 21. Comment ³ are at the DOS Prompt. 22. Keys ³goed c:\autoexec.bat 23. Goto ³END 24. Label ³Try 5 25. IfGoto ³if Menu Item Sel is Greater to/than 5 then goto Try 6 26. RunTask ³taskNum=1 27. Goto ³END 28. Label ³Try 6 29. IfGoto ³if Menu Item Sel is Greater to/than 6 then goto Try 7 30. ChainTo ³c:\gohome\examples\example1.scr 31. Goto ³END 32. Label ³Try 7 33. Label ³END 34. ³ << End Of Script >> I'm sure you've noticed is that it is quite a bit longer than any of the previous examples. However, most of the script contains a repetitive sequence of commands. Let's first examine the DoMenu command. The DoMenu command allows for up to 10 menu items to be entered. When GoHome comes to a DoMenu command, it displays a menu with the given menu items. After the user selects a menu item, GoHome closes the menu and sets the "Menu Item Sel" variable to the number of the menu item selected. There are two exceptions to this, however: if is pressed, "Menu Item Sel" is set to "None"; and 38 if the specified time out period elapses, "Menu Item Sel" is set to "Timed Out". The detail edit dialog box for this example appears as: ÉÍÍÍÍÍÍÍÍÍÍÍÍ DoMenu Edit ÍÍÍÍÍÍÍÍÍÍÍ» º º º ÕÍÍÍÍ Macro Menuúú Í͸ º º 1 ³ N Name ³ º º 2 ³ A Address ³ º º 3 ³ D Today`s Date ³ º º 4 ³ W Start Word Proc ³ º º 5 ³ R Run Task 1 ³ º º 6 ³ T Date/Time Stamp ³ º º 7 ³ ³ º º 8 ³ ³ º º 9 ³ ³ º º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º º ^ÄÄ Enter HotKey char º º º º Timeout 0 Ü º º ßßßßßßßßßßßßßßßß º º OK Ü Cancel Ü º º ßßßßßßßßßß ßßßßßßßßßß º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ You type in the menu title and each menu item. The first character in each menu item is the key that acts as the HotKey. For example, if is pressed when the menu is displayed, the third menu item is selected. If a time out value is needed, specify it in the Time Out field. The command just prior to DoMenu is KeySpeed. KeySpeed is used to modify the rate at which keys are played back. A value of 0 will cause GoHome to play the keys as fast as the program can read them in. If KeySpeed is assigned -1, then the keys are played back as they were recorded or edited. Any other number will delay that number of ticks (1/18 of a second) between each key. In this example, we set KeySpeed to 0 so that GoHome will "type" the keys as fast as possible. The rest of the script executes a specific command based upon the menu item selected. Let's look at the following section of the script. IfGoto ³if Menu Item Sel is Greater to/than 1 then goto Try2 Keys ³Added Dimension Software Goto ³END Label ³Try 2 Notice that the IfGoto statement is testing to see if the menu item selected was anything other than the first item (greater than 1). If that's true, then we skip down to the section of the script that has the label "Try 2" (the third statement from the IfGoto in this case). If the menu item selected is the first item, we do not goto 39 label "Try 2", instead we proceed on to the following command which happens to be the Keys command. After the Keys command executes, we have accomplished our mission so we use the Goto command to jump to the very end of the script. The remainder of the script follows this same sequence of commands. NOTE: To enter the key in the Keys command on line 11, you must first press to go into "accept all keys mode", then hit the key, and finally, press keys again to go back to normal editing mode. Notice that the fifth and sixth menu items use the RunTask ("Add|GoHome Control|Run Task") and ChainTo ("Add|Misc|ChainTo") commands, respectively. The RunTask command will run a task that has been entered into GoSched's Task List. The ChainTo command will "chain to" (or start using) another script file. Both of these commands do not return. This means that the GoTo statements immediately following them will never execute and could therefore be removed. You can easily create your own menu scripts by first copying this script to another file and use it as a template and modify it as needed. 40 Chapter 6 Using the File Editor - GoEd GoHome includes a file editor that has several unique features that make it different from other editors. GoEd was designed to be small in size, load files as quick as possible, be able to define the number of rows and columns to display, allow text to be assigned different colors, and to be integrated in with GoHome to behave as a "pop-up" notepad. GoEd functions like most text editors: it performs basic file editing, search-and-replace, and goto line operations. It also provides several advanced features such as cut, copy, and paste blocks of text, set tabs, set maximum line length, set read-only mode, display control characters, and allows text to be assigned to macro keys. In addition, GoEd also provides for characters to be displayed in different colors and the width and height of the editor to be set. 6.1 Starting GoEd To give you a quick idea of what GoEd can do, let's have it display the file, "ASCII.TXT" (this file is included with GoHome and should be in the same directory). If your are not already in the directory that GoHome is in, go there now. Type the following at the command prompt C:> GOED ASCII.TXT You should see a window appear on your screen that covers just a portion of the screen. The text in the window displays all the ASCII characters and their ASCII numbers. Use the arrow and page keys to scroll around. Note that some of the text is in different colors and that the file is in "read-only" mode so it cannot be edited. Before we get into how you can create files similar to this (you can, of course, just create/edit normal text files), let's go a step further. Bring up GoSched. Select a task that has not been assigned anything (task number three will work if you have been following along) and do the following: 1. In the "Description" field type "Display ASCII Chart" 41 2. In the "Task Type" field select "Command Line" 3. In the "Command" field type "@goed /savscrn=y c:\gohome\ascii.txt" The '@' character at the start of the command string tells DOS to run the command silently (i.e. don't write the command to the screen). The /savscrn=y GoEd parameter tells GoEd to save the image of the screen under its window and to restore it when quiting. If GoEd is not in your PATH statement, specify the complete path for it in the Command field. Also, it's important to enter the complete path for the "ASCII.TXT" file so GoEd can find it. 4. Bring up the Options dialog (press ). Hit the down arrow key once to move to the "None" option in the Video Save section, and select it by pressing the space bar. Next, change both the Memory Required and Memory Desired fields to 192. Then, press to move to the "No countdown" field and press space bar to place a check mark there. 5. Save the changes to the task data file and exit GoSched. 6. Now, run another program (i.e. your text editor). Since we've added a command that will display ASCII.TXT to GoSched, we can execute the task whenever we want to view all the ASCII characters. To do so, bring up GoHome's main menu, press to "Run A Task", enter the number of the task you just entered (i.e. 3). GoEd will then "pop-up" and display a list of ASCII characters! You can create similar text files (such as a To-Do list, a meetings list, and a Notes list) and have them available with the touch of a few keys! You may be wondering how GoEd knew to resize it's window and enter read-only mode. If you happened to look at the very first line of ASCII.TXT, you would have seen the following line: GoEdCmds: /POS=2,27,23,20 /READ /GOTO=2 If the first line of a file contains "GoEdCmds:", GoEd will use the parameters following it as the default edit parameters for the file. GoEd also has a command line parameter, "/IGCMDS", that tells it to ignore any commands in the first line of the file. In this example, the /POS=2,27,23,20 command moves the edit window to the 2nd row and the 27th column of the screen. It also sets the width of the editor to 23 characters and the height to 20 rows. Screen coordinates start with one and go to the maximum allowed by the screen (usually 25 rows and 80 columns). 42 The /READ command puts GoEd into read-only mode (i.e. the file cannot be edited). To turn off read-only mode from inside GoEd, press "" to pop-up the Options dialog. Then press "" to move to the "Read only" field and remove the check mark by pressing the space bar. The file can now be edited. Finally, the /GOTO=2 command tells GoEd to move to the second line of the file. This will hide the commands in the first line of the file. While we're at it, let's see how GoEd determines when to change the color of the text. Bring the Options dialog box up again and un-check the "Use colors codes" field (if you haven't already, un-check the "Read only" field also). The text will now be displayed using the normal text colors and you will see something that looks like: GoEdCmds: /POS=2,27,23,20 /READ /GOTO=2 0 ³ 128 `5Ç`3 1 `5`3 ³ 129 `5ü3 2 `5`3 ³ 130 `5é`3 3 `5`3 ³ 131 `5â`3 4 `5`3 ³ 132 `5ä`3 . . . GoEd uses the forward quote (`) to tell it to use the color that corresponds with the number following it. Note that there are two single quotes on the keyboard, the forward quote is the one that is typically just to the left of the number 1 key and when the key is pressed will display a tilde (~) character. In this example, the character that corresponds to the ASCII number is changed to WHITE on BLUE and then back to CYAN on BLUE (assuming the default color set is used). To do this, `5 is used to change the text color to WHITE on BLUE, the ASCII character follows, and then `3 is used to switch back to CYAN on BLUE. To see the allowable colors and the number (0 to 9) used to get it, press "". This will pop-up the Color Palette window. 6.2 Getting Help Use the key to get help on the keys used. A window will display listing all the keys and the operations they perform. To get additional help, press . This will invoke the help facility so you can browse through the various topics. 43 6.3 Changing Colors Most people are finicky when it comes to the colors they use for their editors. GoEd provides a couple of ways to change the colors used. The simplest way is to use the /CSET and/or /PAL command line parameters (see 9 for details). Another way is to specify the colors directly on command line with the following two parameters: "/TEXT=x" to change the foreground and background colors of the text "/STATUS=x" to change the foreground and background colors of the top and bottom status lines "x" is replaced with a two character sequence. The first character is used to select the background color and the second selects the foreground color. The following table lists the available colors. Character Color ------------------------- 0 Black 1 Blue 2 Green 3 Cyan 4 Red 5 Magenta 6 Brown 7 White 8 Gray 9 Bright Blue A Bright Green B Bright Cyan C Bright Red D Bright Magenta E Yellow F Bright White As an example, to set the text color to Yellow on Brown and the status line to Yellow on Red, the following parameters would be added to the command line (or GOED.CFG) GOED /TEXT=6E /STATUS=4E FILE.TXT 44 Chapter 7 Appendix A - Business Stuff 7.1 The Shareware Concept Shareware distribution gives users a chance to try software before buying it. If you try a Shareware program and continue using it, you are expected to register. Individual programs differ on details some request registration while others require it, some specify a maximum trial period. With registration, you get anything from the simple right to continue using the software to an updated program with printed manual. See "Registering GoHome" below for details on what you will receive in return for registering this program. Copyright laws apply to both Shareware and commercial software, and the copyright holder retains all rights, with a few specific exceptions as stated below. Shareware authors are accomplished programmers, just like commercial authors, and the programs are of comparable quality. (In both cases, there are good programs and bad ones!) The main difference is in the method of distribution. The author specifically grants the right to copy and distribute the software, either to all and sundry or to a specific group. For example, some authors require written permission before a commercial disk vendor may copy their Shareware. See the files VENDOR.DOC distribution rights for GoHome and its utilities. Shareware is a distribution method, not a type of software. You should find software that suits your needs and pocketbook, whether it's commercial or Shareware. The Shareware system makes fitting your needs easier, because you can try before you buy. Because the overhead is low, prices are low also. Shareware has the ultimate money-back guarantee if you don't use the product, you don't pay for it. 45 7.2 Benefits of Registering Participating in the shareware marketplace as a registered user brings more than the mere satisfaction of doing the right thing, you really become a part of the creative process. We at Added Dimension Software welcome any comments, requests or suggestions you may have for enhancements to this program, or for entirely new programs you would like to see produced and distributed as shareware. Please let us know how we may serve you in any way we can. Registered users will receive: . The latest version of the GoHome programs (GoHome.exe, GoSched.exe, GoEd.exe, GoScript.exe, and GoHelp.exe) devoid of ALL Shareware notices and reminder screens. . Bound printed versions of the Tutorial and a Reference Manual. . Technical support for the first three months. . A software license which will allow you to LEGALLY use GoHome. Non-registered users are only licensed to use it for a 30 day evaluation period. If you continue to use GoHome after the 30 day trial period you MUST register. . Be allowed to upgrade at substantial savings. . Kept abreast of updates and new product offerings from Added Dimension Software. We would also love to hear about how you are using GoHome and any "tips and techniques" that you've found useful. 7.3 Registering GoHome If you find GoHome to be a useful tool, please register it. Added Dimension Software depends on your support in order to continue to serve your needs with high quality, reasonably priced software. To register, send $50 (postage FREE) cash, check, or money order to Added Dimension Software at the address below. Texas residents please add the current sales tax to the total. Outside the USA and Canada, please add $6 to cover special shipping and handling costs, for a total of $56. US funds drawn on a US bank, or cash are acceptable cash payments and should be sent via registered mail and may be in US funds or in your country's currency at the current exchange rate. Added Dimension Software cannot be responsible for cash payment lost in the mail. An order form is enclosed in the file REGFORM.TXT on the distribution disk and may printed and mailed in. 46 Credit Card orders will be accepted through Public (software) Library (PsL). Call the PsL toll-free order line (800)242-4775 to place your order. To speed your order use PsL's item number #11304 for GoHome when ordering. This 800 number is for ORDERS ONLY! The people there are unable to answer any other questions about the program. For information on the program or technical help please call Added Dimension Software direct at the number below. You may also instantly register via CompuServe's Shareware Registration service. The registration fee will be billed to your CompuServe account, and the registered version will be shipped to you immediately! Just log onto CompuServe and type "GO SWREG" at the ! prompt. Then choose "Register Shareware" and search the database using the Registration ID: 2482, or Program Name: "GoHome". Then just follow the on screen instructions. For further information please feel free to contact Added Dimension Software via mail, phone, or email at: Added Dimension Software, Inc. 6780 Abrams Rd. Suite 103-190 Dallas, TX 75231 Phone (voice): (214) 341-5759 CompuServe ID: 73311,1062 7.4 ASP Ombudsman statement Added Dimension Software is a member of the Association of Shareware Professionals (ASP). ASP wants to make sure that the shareware principle works for you. If you are unable to resolve a shareware-related problem with an ASP member by contacting the member directly, ASP may be able to help. The ASP Ombudsman can help you resolve a dispute or problem with an ASP member, but does not provide technical support for members' products. Please write to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442-9427 USA, FAX 616-788- 2765, or send a CompuServe message via CompuServe Mail to ASP Ombudsman 70007,3536. 47 Chapter 8 Appendix B - Using Configuration Files It can be quite tedious if you have to enter a number of command line parameters each time a program is run. Further, you cannot specify any command line parameters when GoHome is used to invoke GoSched or when GoSched is used to edit batch files (start GoEd) and script files (start GoScript) by pressing the key. To get around these limitations, each program looks for a configuration file when starting. If a configuration file is found, each parameter it contains is acted on as if it was entered on the command line. Options specified in a configuration file will be overridden by those specified on the command line. The default name for the configuration files is the name of the executable with a file extension of ".cfg" as shown below: Program Configuration file ----------------------------- GoHome GOHOME.CFG GoSched GOSCHED.CFG GoScript GOSCRIPT.CFG GoEd GOED.CFG GoHelp GOHELP.CFG You may set up a number of configuration files and specify the one you want to use on the command line by appending an "@" symbol before the configuration file name. For example, to use JOHNS_ED.CFG file when starting GoEd you would enter: C:> GOED @JOHNS_ED.CFG FILE.TXT where JOHNS_ED.CFG might contain the following three lines /TEXT=6B /STATUS=2E /TAB=8 /LEN=255 48 Chapter 9 Appendix C - Using /CSET and /PAL Most of the GoHome programs allow you to specify a number of different color schemes and color palettes. There are six different color schemes that are specified using the /CSET=n parameter on the command line or in the configuration file. The "n" value may be one of the following: n Color Set ---------------------- b black and white m monochrome 1 normal color set 2 second color set 3 third color set 4 fourth color set To specify a color palette, use the /PAL=n parameter where "n" is one of: n Palette Set -------------------------------------- 0 Use the "normal" PC color palette 1 Use the first color palette 2 Use the second color palette Palette sets are only available on color monitors. Different color and palette sets will result in different color combinations. 49