home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 355.lha / Xtools_v1.0 / XTools.doc < prev    next >
Text File  |  1990-03-12  |  4KB  |  102 lines

  1.                                              February 9, 1990 
  2.                        XTools.doc v1.0       
  3.  
  4. Readme_me_first:
  5.  
  6.    If you don't like reading obnoxious docs, just boot form a
  7. standard Workbench 1.3 and double-click all the included icons.
  8. Intrigued or interested? Read on...
  9.  
  10.    This small utility (3276 bytes) can run from the Workbench any
  11. legal DOS command or set of commands that would normally require a
  12. CLI or a batch file. Yet XTools doesn't use any ASCII file (like
  13. IconX or Xicon) for input, but the "Tool Type" string gadget in the
  14. Info window of any Project icon. Anything after "A=" will be
  15. executed.  
  16.  
  17.    But why would anybody want to replace IconX by XTools? First,
  18. XTools is smaller and friendlier: you don't need a text editor to
  19. modify commands, and you don't need any ASCII file around. You can
  20. program directly any free Project icon with the Workbench "Info"
  21. menu item. And finally, XTools' powerfull options can do tricks that
  22. IconX users wouldn't *dream* of. More on that below.
  23.  
  24. XClock:
  25.  
  26.    This icon will open the Workbench clock as I like it, with the
  27. Digital 2, 24 hours and seconds option. You may not like the empty
  28. window that opens and closes with the clock. Of course, it could be
  29. left out, but then, any program that outputs text would crash the
  30. system. This simple example was put up to show how a Project icon
  31. can be set to run a program with any option you like, as you would
  32. from the CLI.
  33.  
  34. XEd:
  35.  
  36.    This is another simple example that shows how you can freeze a
  37. set of commands in a Project icon. You do it once and then anybody
  38. can repeat it with a click of the mouse. Use Esc Q to exit Ed.
  39.  
  40. XList: (the clever stuff)
  41.  
  42.    The first line writes a script file to the ram disk:
  43.       A=echo >ram:exe "list libs:"
  44. note that the echo command requires quotes if there is one or more
  45. blank space in the argument. The second line appends a new line to
  46. the script file ram:exe:
  47.        B=echo >>ram:exe "prompt *"[%n]%s*""
  48. note the >> that tells AmigaDos to append the second argument to
  49. exe. In this line, the asterisks are used to escape the internal
  50. quotes needed by the prompt command. Finally, the last line opens a
  51. shell from the file ram:exe:
  52.       C=newshell "CON:0/0/600/200/ListWindow" from ram:exe
  53.  
  54.    Why open a CLI from a file? Because the standard output of
  55. XTools is directed to the small XTools window, which will not accept
  56. any input from the keyboard. So a CLI window is needed for the
  57. input/output, and opening it from a file does the job. The EndCli
  58. command is needed to close that window.
  59.  
  60. Directory Assignments
  61.  
  62.    Hard disk users can use an icon that assign the correct
  63. directory and runs the program. For instance, to start JRComm, you
  64. can use:
  65.       A=assign JRComm: dh1:Telecom
  66.       B=JRComm
  67.  
  68. Editing a Project icon
  69.  
  70.    Simply drag one of the included icon in the ram disk. The icon
  71. name doesn't matter, but make sure you give it a unique name in a
  72. directory. The XTool icons are free; they don't have any non .info
  73. file attached. Then use the Workbench Info menu item. The XTools
  74. program should be copied in the c: directory and the Default Tool
  75. should be changed to c:XTools. Now take a look at the the Tool Type
  76. string gadget. You can click on the up and down arrow gadgets to
  77. move up or down the command list. The first command is marked by
  78. "A=", the second one by "B=", and so forth. When the screen flashes,
  79. you've reached the end of the list. Up to 26 commands (from A= to
  80. Z=) can be executed.  Edit the lines, click the Save gadget and
  81. double-click the icon to test it. If you use a ram: file, you can
  82. check if the file is O.K. by entering "type ram:exe". 
  83.  
  84. Known bugs and quirks:
  85.  
  86.    You can edit an icon to format disks the way you like, for
  87. instance with:
  88.       A=format drive df1: name Data noicons
  89. but Format will not wait for confirmation (Y or N) and will start
  90. formating at once any disk in df1:. I'm not sure this is a bug:
  91. seasoned users may actually like it! Those who like safer programs
  92. can have it their way by opening a CLI from a file, like in the
  93. above XList example.
  94.  
  95.    Thanks to John Toebes for the code that got me started (Amiga
  96. Transactor, December 1988, p.69)
  97.  
  98.    
  99.  
  100.                                Michel Laliberté
  101.                                       Montréal
  102.