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 . It 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 .
2The use of stick allows you to define your application by means of Obey files called !Select , !Adjust and !Drag , which are triggered when these actions take place . These Obey files ( or TaskObey files in appropriate circumstances ) may typically execute non - wimp programs in other languages . In 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 !Select , !Adjust and !Drag , as_far_as they exist , the responsibility for how the computer should react .
3You can download as an example the application taskW which runs in a taskwindow an executable that is dragged to it . Its !Drag file is a TaskObey file ( filetype &FD7 ) which runs its first commandline argument ( %0 ) which is always the pathname of the object dragged onto the iconbar icon . Its !Run file 's essential command is stick <Obey$dir> which creates the application and puts its icon on the iconbar .
4Every sticky application of this kind must have a template file called Templates , with a window - template called info in it . This is to give the application an iconbar menu that behaves properly . The simplest way of creating the template file is to copy the one in !taskW and edit it in a template - editor .
5I 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 .