Top    a_stick

title stick
author Gavin Wraith
content description instruction manual : computer utility
url http://www.wra1th.plus.com/stick.html

1stick is a small BASIC program that I wrote years ago, originally in assembler, which has saved me a lot of work.
2It is useful for those wimp programs which do not open windows but put an icon on the iconbar, and for which all user input is either by clicking on the iconbar icon or by dragging something to it.
3The use of stick allows you to define your application by means of Obey files called <excl>Select, <excl>Adjust and <excl>Drag, which are triggered when these actions take place.
4These Obey files (or TaskObey files in appropriate circumstances) may typically execute non - wimp programs in other languages.
5In other words, stick creates a wimp - task that handles only clicks on the iconbar (including Menu) or drags to the iconbar, and nothing else, pushing out to <excl>Select, <excl>Adjust and <excl>Drag, as far as they exist, the responsibility for how the computer should react.
6You can download as an example the application taskW which runs in a taskwindow an executable that is dragged to it.
7Its <excl>Drag file is a TaskObey file (filetype <amp>FD7) which runs its first commandline argument (<percnt>0) which is always the pathname of the object dragged onto the iconbar icon.
8Its <excl>Run file's essential command is stick <lt>Obey<dollar>dir<gt> which creates the application and puts its icon on the iconbar.
9Every sticky application of this kind must have a template file called Templates, with a window - template called info in it.
10This is to give the application an iconbar menu that behaves properly.
11The simplest way of creating the template file is to copy the one in <excl>taskW and edit it in a template - editor.
12I realize that it would have been easier for you had I brought out a version of stick that used MessageTrans to provide the menu items from a text file, but it would have meant more code in stick to create the menu, and I am lazy.