home *** CD-ROM | disk | FTP | other *** search
- February 9, 1990
- XTools.doc v1.0
-
- Readme_me_first:
-
- If you don't like reading obnoxious docs, just boot form a
- standard Workbench 1.3 and double-click all the included icons.
- Intrigued or interested? Read on...
-
- This small utility (3276 bytes) can run from the Workbench any
- legal DOS command or set of commands that would normally require a
- CLI or a batch file. Yet XTools doesn't use any ASCII file (like
- IconX or Xicon) for input, but the "Tool Type" string gadget in the
- Info window of any Project icon. Anything after "A=" will be
- executed.
-
- But why would anybody want to replace IconX by XTools? First,
- XTools is smaller and friendlier: you don't need a text editor to
- modify commands, and you don't need any ASCII file around. You can
- program directly any free Project icon with the Workbench "Info"
- menu item. And finally, XTools' powerfull options can do tricks that
- IconX users wouldn't *dream* of. More on that below.
-
- XClock:
-
- This icon will open the Workbench clock as I like it, with the
- Digital 2, 24 hours and seconds option. You may not like the empty
- window that opens and closes with the clock. Of course, it could be
- left out, but then, any program that outputs text would crash the
- system. This simple example was put up to show how a Project icon
- can be set to run a program with any option you like, as you would
- from the CLI.
-
- XEd:
-
- This is another simple example that shows how you can freeze a
- set of commands in a Project icon. You do it once and then anybody
- can repeat it with a click of the mouse. Use Esc Q to exit Ed.
-
- XList: (the clever stuff)
-
- The first line writes a script file to the ram disk:
- A=echo >ram:exe "list libs:"
- note that the echo command requires quotes if there is one or more
- blank space in the argument. The second line appends a new line to
- the script file ram:exe:
- B=echo >>ram:exe "prompt *"[%n]%s*""
- note the >> that tells AmigaDos to append the second argument to
- exe. In this line, the asterisks are used to escape the internal
- quotes needed by the prompt command. Finally, the last line opens a
- shell from the file ram:exe:
- C=newshell "CON:0/0/600/200/ListWindow" from ram:exe
-
- Why open a CLI from a file? Because the standard output of
- XTools is directed to the small XTools window, which will not accept
- any input from the keyboard. So a CLI window is needed for the
- input/output, and opening it from a file does the job. The EndCli
- command is needed to close that window.
-
- Directory Assignments
-
- Hard disk users can use an icon that assign the correct
- directory and runs the program. For instance, to start JRComm, you
- can use:
- A=assign JRComm: dh1:Telecom
- B=JRComm
-
- Editing a Project icon
-
- Simply drag one of the included icon in the ram disk. The icon
- name doesn't matter, but make sure you give it a unique name in a
- directory. The XTool icons are free; they don't have any non .info
- file attached. Then use the Workbench Info menu item. The XTools
- program should be copied in the c: directory and the Default Tool
- should be changed to c:XTools. Now take a look at the the Tool Type
- string gadget. You can click on the up and down arrow gadgets to
- move up or down the command list. The first command is marked by
- "A=", the second one by "B=", and so forth. When the screen flashes,
- you've reached the end of the list. Up to 26 commands (from A= to
- Z=) can be executed. Edit the lines, click the Save gadget and
- double-click the icon to test it. If you use a ram: file, you can
- check if the file is O.K. by entering "type ram:exe".
-
- Known bugs and quirks:
-
- You can edit an icon to format disks the way you like, for
- instance with:
- A=format drive df1: name Data noicons
- but Format will not wait for confirmation (Y or N) and will start
- formating at once any disk in df1:. I'm not sure this is a bug:
- seasoned users may actually like it! Those who like safer programs
- can have it their way by opening a CLI from a file, like in the
- above XList example.
-
- Thanks to John Toebes for the code that got me started (Amiga
- Transactor, December 1988, p.69)
-
-
-
- Michel Laliberté
- Montréal
-