MenuLock v1.01 © Copyright 1991 Jaba Development Written with DICE C v2.6 by Jan van den Baard Based on commodity code by Stefan Sticht (FISH 497) DISCAIMER --------------------------------------------------------------------------- The author is NOT responsible for the suitability or accuracy of this documentation and/or the program(s) it describes. Any damage directly or indirectly caused by the use or misuse of this documentation and/or the program(s) it describes is the sole responsibility of the user her/him self --------------------------------------------------------------------------- COPYRIGHT --------------------------------------------------------------------------- MenuLock v1.01, © Copyright 1991 Jaba Development. All rights reserved. This program may be distributed non-commercially only providing that the executable, source code, documentation and copyright notices remain unchanged and are included with the distribution. This program is FREEWARE so no financial donation is necessary ( but welcome ). Send me a postcard of your hometown if you use this program. --------------------------------------------------------------------------- Have you ever browsed through the menus of a program and released the menu button over the wrong item? Or have you got an old mouse of which it's menu button is broken or worn out? If so this might be the program you need. MenuLock is a commodity which enables the user to "lock" the menu strip of a window at the touch of a few keys. It's possible to start MenuLock from either the Shell or the Workbench. The following arguments are possible: PRIORITY= - With this argument it's possible to set the commodity it's priority in the commodities queue. Default : 0 LOCK= - This enables you to set your own hotkey (See below) to lock the menu strip. Default : rcommand down UNLOCK= - This enables you to set your own hotkey (See below) to unlock the menu strip. Default : rcommand up QUIT= - This enables you to set your own hotkey (See below) to quit the commodity. Default : lshift control q Here are some examples of how you can start MenuLock from the Shell: Run MenuLock LOCK="lalt l" UNLOCK="lalt u" Run MenuLock QUIT "lcommand esc" NOTE: You have to "Run" or "RunBack" MenuLock when you start it from the Shell. This is because DICE does not have an auto detach "_main.c". (Maybee I'll hack my own some day.....) You must specify the arguments via the tooltypes array of the program it's icon when it's started from the Workbench. When you start MenuLock from the WBStartup drawer you must specify the DONOTWAIT tooltype. Input Description Strings (HotKeys): The Input Description String (HotKeys) has the following template: [qualifier] [...] qualifier: lshift left shift key rshift right shift key shift either shift key capslock capslock key caps shift or capslock key control control key lalt left alt key ralt right alt key alt either alt key lcommand left amiga key rcommand right amiga key numericpad key on numericpad rbutton right mouse button midbutton middle mouse button leftbutton left mouse button newprefs change in preferences diskremoved disk ejected diskinserted guess what..... key f1 -> f10 function keys up cursor up key down cursor down key left cursor left key right cursor right key help help key del delete key return return key enter enter key backspace backspace key esc escape key space space key comma comma key upstroke key released a -> z, 0 -> 9 normal ansi keys Choose your keys carefully when other commodities are running. Requirements: MenuLock needs atleast Kickstart 2.0 V36++ to run. Error return codes. MenuLock doesn't print information to the screen when something didn't work. You can figure out what went wrong by checking the return code with this list. 20 MenuLock wasn't able to open the libraries it so desperatly needs. 21 MenuLock wasn't able to create a message port for the communication. 22 The broker could not be setup. This could mean that another commodity is running which has the same name as MenuLock. 23 MenuLock wasn't able to setup it's HotKey filters. This probably means that you have fed MenuLock wierd HotKey strings. 24 There was an error detected if the commodity objects with CxObjError. 25 MenuLock wasn't able to setup the InputEvent structures to emulate the mouse menu button. 26 MenuLock wasn't able to setup it's Translate objects. This probably means that you have fed MenuLock wierd HotKey strings. 27 You passed MenuLock wierd arguments in the Shell. History: V1.00 (15-Sep-1991) 5784 bytes. - Initial release V1.01 (22-Sep-1991) 5168 bytes. - MenuLock now uses the Dos routine "ReadArgs()" for parsing the arguments when run from the Shell. - By-Passed the main from c.lib to trim some bytes off the executable. Bug reports, flames, etc. to me at the following address. Jan van den Baard Bakkerstraat 176 3082 HE, Rotterdam Holland Fido: 2:500/29 (Jan van.den.Baard)