CANDO TUTORIAL - StripRunner, An Applications Launching Strip  by Trevor Parker Ed: Trevor also wrote the CanDo programs you'll find on this issue - particularly StockList, a fine program for small business.  ¿? 35 ¿*? 35 ¿*? 35 ¿*? 35 ¿*? 35 ¿*? 35 ¿*? 35 ¿*? 35 ¿*? 35 ¿*? 35 ¿? In this tutorial we will create a thin (one Character) window to contain a strip of buttons for launching your favourite programs and scripts. Some useful AmigaDos script examples are included in the article. The StripRunner window will open on the WB screen immediately adjacent to the RH scroll bar. There are many types of applications launchers available, but this one is so thin, so conveniently placed on Workbench and, so easy to use that I have discarded all other fancy menu etc utilities in its favour. I will assume that you have at least worked through the tutorials in your manual and are therefore familiar with the means of adding objects such as windows, buttons, etc to a card. There will be only one card in the deck so let's get started: CARD_1 Window ORIGIN 602,22 SIZE 19,348 TITLE Blank - no title COLOURS 4 OBJECTS DRAGBAR OPTIONS Activate, Bring to front, Try to open on Workbench Button_1 ORIGIN 4, 11 SIZE 10' 12 BORDER BEVEL - white with black shadow looks OK HIGHLIGHT COMPLEMENT TEXT Leave this blank for now By now you should have a thin window running most of the way down the RH side of your WB screen next to the slider bar with one small bevel button sitting neatly in the top of the window. To create the rest of the buttons: a. For CanDo Version 2.0 Users From the Main Control Panel menu bar select Tools...SuperDuper. With Button_1 highlighted in the SuperDuper editor window, set the fields as follows: Inter-Object Offset X = 0, Y = 12 (ie. each new button is created with the same X origin as the highlighted one but the Y origin is incremented by 12 pixels each time. Columns = 1 Rows = 28 Naming Method - Object Select "Perform" and SuperDuper will replicate Button_1 twenty- seven times filling your window with bevel buttons ready for you to define text and scripts. b. For Pre-version 2.0 Users Select "Edit" and the Button Object in the Main Control Panel and when the Button Object System appears, select "Add", then progressively add new buttons until you have filled the window with them. They should each have identical specifications as Button_1 except, of course, their Y origins which will increment by 12 pixels in each case.  Text and Scripts Start with the last button and set it to TEXT = Q (font = Topaz 8) Release script = Quit Use a different colour for the text of this button than the colour you intend to use for the remaining buttons. Now make an alphabetical list of the applications and scripts you want to run from StripRunner and select a single letter to denote each one eg: A for Accounts(say, Home Accounts2) B for BootX C for CanDo D for Dict2Ram (script) - see later E for Editor (say, CygnusEd) F for Flow ...etc L for LockHD (script)...etc O for Opus R for Fonts2Ram (Script) - see later S for Fonts2SYS (script - see later etc. Using the DOS tool within the Script Editor to set up the scripting code to run your programs is easy - just choose "DOS" in the script editor and use the resulting file requesters to set the path to your program or script, hen select OK and there is your script! Just be sure to select the "CD, Stack and Run" button in the DOS file requester for any programs which need large stack sizes, then carefully amend the stack size in the resulting script to the size required. For example, the "release" script you should end up with for CanDo (assuming my path) is: Let DosVar = "CD Work:CanDo/" || Char(10) ; CD to the dir Let DosVar = DosVar || "Stack 20480" || Char(10) ; Change Stack Let DosVar = DosVar || "Run >Nil: NIL: < NIL" command as I have set the "S" protection bit for Fonts2Ram making it a self-executing script The script to reassign fonts to SYS: is - Echo "Returning Fonts to SYS:" assign fonts: sys:fonts and my "S" button release script is Dos "c:Fonts2Sys" As you can see, I keep these scripts in my c: directory. Dict2Ram - Actually, this script could be called Dict&Thes2Ram because it will copy ProWrite's dictionary and thesaurus to Ram: to save time and hard drive wear when you use these files. The script (asuming a particular path) is: Dos "Run >Nil: nil: Nil: