|
ButtonIt v. 0.35 (5/11/1990, David Slauson) |
Readme/What's new |
IBM License Agreement for BUTNIT
IF YOU DOWNLOAD OR USE THIS PROGRAM YOU AGREE TO THESE TERMS.
International Business Machines corporation grants you a license
to use the Program only in the country where you acquired it.
The Program is copyrighted and licensed (not sold). We do not
transfer title to the Program to you. You obtain no rights other
that those granted you under this license.
Under this license, you may:
1. use the Program on one or more machines at a time;
2. make copies of the Program for use or backup purposes within
your Enterprise; and
3. modify the Program and merge it into another program.
You must reproduce the copyright notice and any other legend of
ownership on each copy or partial copy, of the Program.
Except as expressly provided in the DAPTOOLS LIBRARY License
Agreement (TOOLIC.TXT), you may NOT:
1. distribute the program in any manner, including through
electronic bulletin board systems or other means;
2. sublicense, rent, lease, or assign the Program; and
3. reverse assemble, reverse compile, or otherwise translate
the object code of the Program.
We do not warrant that the Program is free from claims by a third
party of copyright, patent, trademark, trade secret, or any other
intellectual property infringement.
Under no circumstances are we liable for any of the following:
1. third-party claims against you for losses or damages;
2. loss of, or damage to, your records or data; or
3. economic consequential damages (including lost profits or
savings) or incidental damages, even if we are informed of
their possibility.
Some jurisdictions do no allow these limitations or exclusions,
so they may not apply to you.
We do not warrant uninterrupted or error free operation of the
Program. We have no obligation to provide service, defect
correction, or any maintenance for the Program. We have no
obligation to supply any Program updates or enhancements to you
even in such are or later become available.
IF YOU DOWNLOAD OR USE THIS PROGRAM YOU AGREE TO THESE TERMS.
THIS PROGRAM IS PROVIDED "AS IS" WITHOUT ANY WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.
Some jurisdictions do not allow the exclusion of implied
warranties, so the above exclusion may not apply to you.
You may terminate this license at any time. We may terminate
this license if you fail to comply with any of its terms. In
either event, you must destroy all your copies of the Program.
You are responsible for the payment of any taxes resulting from
this license.
You may not sell, transfer, assign, or subcontract any of your
rights or obligations under this license. Any atdttempt to do so
is void.
Neither of us may bring a legal action more than two years after
the cause of action arose.
If you acquired the Program in the United States, this license is
governed by the laws of the State of New York. If you acquired
the Program in Canada, this license is governed by the laws of
the Province of Ontario. Otherwise, this license is governed by
the laws of the country in which you acquired the Program.
-----------------------------------------------------------------------------
***** ButtonIt v0.31 *****
ButtonIt allows you to associate a window full of buttons with
another OS/2 window. Any button pressed in the ButtonIt window
causes a command to be sent to the "target" window. For example,
the OS/2 Communications Manager terminal emulation window does not
have any buttons in its' client area. By running ButtonIt, and
associating its' buttons with the CommMgr window, you can use
ButtonIt's buttons to provide functions within your terminal
emulation session.
| Starting with version 0.30, ButtonIt has the ability to associate
| a character string with a button. This means that by defining a
| button (in a .PRO file) appropriately, you can send complete VM
| commands to a target terminal emulator window, or define frequently
| typed phrases as templates, and send them to your favorite editor
| window. The new STRING keyword (in the .PRO file) is potentially
| a very powerful tool. See BUTTONIT.PRO for examples of using the
| STRING keyword.
IMPORTANT - Associating ButtonIt with a Target Window:
-----------------------------------------------------------------
When you start ButtonIt, you will be asked to click on the window
that is to be the "target" of ButtonIt's buttons. The mouse
pointer will be replaced with a special (colorful) ButtonIt mouse
pointer that is used for selecting the target window. You should
be sure to click within the "client" area (usually the central area
within the target window's frame, but NOT on top of a control
(menubar, scrollbar, min/max control, etc) since in PM controls are
actually little windows themselves. The client window is usually
the main controlling window for an application, and processes the
commands for the application. When you click on the target client
area, ButtonIt figures out the "handle" of the window under the
pointer and uses that "handle" as a means of routing button command
information to the target window. If you click on a window that is
*not* the client window, the ButtonIt buttons will probably be
ignored by the application. Once you've clicked the right mouse
button on the target client window, any buttons pressed in the
ButtonIt window will cause a corresponding function to occur within
the target window.
Targeting Another Window:
------------------------------------------------------------------
Once ButtonIt is active, you can target another window by clicking
on the system menu icon in the upper-left corner of ButtonIt's
window, and select "Target Another Window". The window targeting
mouse pointer again becomes active until you've selected another
target window.
|
| FASTPATH: you can also bring up the re-targeting pointer by double
| clicking the right mouse button whenever the mouse pointer is over
| the ButtonIt client area (the part of the window where all the
| buttons are).
| ButtonIt Profiles:
| ------------------------------------------------------------------
| Starting with v0.20, ButtonIt is able to configure itelf and read
| button definitions from a profile. A sample profile, BUTTONIT.PRO
| is provided. Please read the comments in BUTTONIT.PRO very
| carefully, in order to find out what is allowed, and how the
| different profile keywords are used. Profiling may prove somewhat
| daunting to non-technical users, but in the future we hope to be
| able to provide a set of pre-configured profiles.
|
| To run ButtonIt with a customized profile, start ButtonIt by typing
| the following command:
|
| BUTTONIT buttonit.pro
|
| ButtonIt will search the current directory, DPATH, and PATH (in that
| order) for the profile. No way is currently provided to switch to
| a new profile, once ButtonIt has been started. This may be added in
| a future version.
Ideas for Possible Future Enhancements:
------------------------------------------------------------------
- Standard "template" profiles, possibly selectable from within
ButtonIt.
- Automatic "Client" Targeting: If you select the "frame" window
or controls by mistake, instead of the client window, ButtonIt
sends its' commands to those windows, and nothing happens. If
possible, ButtonIt should check the "clicked-on" window, and if
it's not the client, try to figure out the handle of the client,
perhaps by chasing down the windows enumeration chain.
- Dynamic Window Targeting: When a child window (of the target)
becomes active, ButtonIt continues to route commands to the
original target window. It'd be nice if ButtonIt could
dynamically "figure out" which window to send commands to.
This feature could also allow ButtonIt to re-target itself
whenever the user changes active windows (ie. makes the window
from a different application active, not just the parent/child
within the targeted application). I've experimented with this
feature, but so far haven't yet made it work.
- Window "Attachment": It might be nice to "attach" the ButtonIt
window to the bottom or side of the target window, so that the
association between the windows is more apparent. This would
make it seem more like the ButtonIt buttons were actually a
part of the target application.
Current Limitations/Restrictions:
------------------------------------------------------------------
- Different applications react in different ways to keystrokes (or
"soft" keystrokes). ButtonIt is known to work with the OS/2
CommMgr and with PMANT, but does not send keycodes that will
satisfy *all* applications. We may be able to address this
| restriction via the profile feature which has been added.
- ButtonIt works by sending standard WM_CHAR messages to the
target window, with the "virtual keycodes" (VK_* values) and
scan codes set as the message parameters for the WM_CHAR msg.
If the application does not respond to the virtual keycode or
scancode, then ButtonIt's buttons will have no effect.
ButtonIt is known to work with the OS/2 CommMgr, and PMANT.
- If the target window brings up a "child" window ButtonIt will
continue to direct commands to the previously selected "target"
window.
- ButtonIt is currently most useful when targeting a non-PMish
window, like the OS/2 CommMgr. Such applications usually do
not have any (or many) child windows, so do not suffer as much
from the child window problem mentioned above.
| - Sending a STRING to a target window sometimes takes a second
| or so. This happens because when you send a STRING of
| characters to a target window, it takes a while for that
| window to react. In addition, it was necessary to put a
| brief delay (5 msec) between characters to keep from
| overwhelming OS/2 PM's message queue.
Origins:
------------------------------------------------------------------
Although I am the current author of the code in ButtonIt, the
ideas behind it sprang from a series of WIBNI conversations that
Davis Foulger and I had recently. ButtonIt is currently an
experimental application.
David Slauson
***********************************************************************
* Sample ButtonIt Profile
*
* You may pass the name of a ButtonIt profile at invocation. Any line
* in the profile starting with '*' will be ignored as a comment. The
* profile consists of KEYWORDs followed by parameters. There is
* relatively little error checking when processing the profile, and
* at present, error messages tend to be somewhat cryptic. If you
* use one of the sample .PRO files as a skeleton, you should not have
* too many problems.
*
* ButtonIt will search for the profile you request as follows:
* 1) Search the current directory
* 2) Search the DPATH
* 3) Search the PATH
*
* If there are serious errors detected while processing the profile,
* ButtonIt will ignore the profile and use programmed defaults.
*
* Parameters are separated by blanks
* Blank Lines (starting with v0.30) are ignored.
***********************************************************************
* ButtonIt Window Width
WIDTH 600
* ButtonIt Window Height
HEIGHT 100
* Total number of buttons to display; If the number given is less than
* the number of KEY or STRING statements, their values will still be
* loaded, but the button will not be displayed. These "undisplayed"
* buttons will be useful in a future release as a mechanism that will
* be used when the MACRO keyword is implemented.
*
NUMB 24
* Number of Rows of Buttons; you may need to experiment to make sure
* the number of rows is visually compatible with the WIDTH and HEIGHT
ROWS 3
* Replace the default ButtonIt prompt msg with the PROMPT keyword
PROMPT After clearing this window, Click on the target window you wish to send keystrokes to...
* If you wish to customize the ButtonIt titlebar text, use TITLEBAR
TITLEBAR My Buttons
**********************************************************************
* Keycodes and Scancodes for each button can be defined using KEY
*
* Format:
* KEY button_label button_number keydown_mp1 keydown_mp2 keyup_mp1 keyup_mp2
*
* Note that the mp1 and mp2 values for keyup and keydown are coded
* as hexadecimal values in the examples below. Only the top byte of
* mp1 should be altered... the remainder of mp1 indicates that contains
* repeat and flag bytes.
*
* Perhaps the best way to determine what you should code for the mp1 and
* mp2 values is to use PMSPY to monitor keystrokes in your "target"
* window... look for WM_CHAR messages and copy down the mp1 and mp2
* values for the keydown and keyup WM_CHAR events. Over time, I hope
* we can offer a collection of tested profiles that contain all the
* correct mp1 amd mp2 data for various target windows.
*
* In addition, the VK_* virtual key codes
* are defined in PMWIN.H (part of the OS/2 programmers toolkit) and the
* scancodes are listed in the PS/2 BIOS tech ref. There's also a good
* description of the WM_CHAR mp1 and mp2 format starting on pg339 of
* "Programming the OS/2 Presentation Mgr" by Charles Petzold.
*
* Each button has a button_number. Buttons are numbered starting at the
* top left button (button 1) and increasing as you move right and down.
*
* There's a 128-button limit.
* Button Label field should not exceed 8 characters!
*
* The KEY definitions below are for the default button set plus Clear
* and Newline.... arranged horizontally. If you
* do not code values for all 20 default buttons, BUTTONIT will use
* the programmed defaults for any buttons not coded for.
**********************************************************************
* button#1, VirtualKeycode 20, scancode 3B00
KEY pf1 1 0x3B011006 0x00203B00 0x3B011146 0x00203B00
* button#2, VirtualKeycode 21, scancode 3C00
KEY pf2 2 0x3C011006 0x00213C00 0x3C011146 0x00213C00
* button#3, VirtualKeycode 22, scancode 3D00
KEY pf3 3 0x3D011006 0x00223D00 0x3D011146 0x00223D00
* button#4, VirtualKeycode 23, scancode 3E00
KEY pf4 4 0x3E011006 0x00233E00 0x3E011146 0x00233E00
* button#5, VirtualKeycode 24, scancode 3F00
KEY pf5 5 0x3F011006 0x00243F00 0x3F011146 0x00243F00
* button#6, VirtualKeycode 25, scancode 4000
KEY pf6 6 0x40011006 0x00254000 0x40011146 0x00254000
* button#7, VirtualKeycode 26, scancode 4100
KEY pf7 7 0x41011006 0x00264100 0x41011146 0x00264100
* button#8, VirtualKeycode 27, scancode 4200
KEY pf8 8 0x42011006 0x00274200 0x42011146 0x00274200
* button#9, VirtualKeycode 28, scancode 4300
KEY pf9 9 0x43011006 0x00284300 0x43011146 0x00284300
* button#10 VirtualKeycode 29, scancode 4400
KEY pf10 10 0x44011006 0x00294400 0x44011146 0x00294400
* button#11 VirtualKeycode 2A, scancode 8500
KEY pf11 11 0x57011006 0x002A8500 0x57011146 0x002A8500
* button#12 VirtualKeycode 2B, scancode 8600
KEY pf12 12 0x58011006 0x002B8600 0x58011146 0x002B8600
* button#13 VirtualKeycode 0F, scancode 011B
KEY Esc 13 0x01011006 0x000F011B 0x01011146 0x000F011B
* button#14 VirtualKeycode 1E, scancode 1C0D
KEY Enter 14 0x1C011006 0x001E1C0D 0x1C011146 0x001E1C0D
* button#15 VirtualKeycode 11, scancode 49E0
KEY PgUp 15 0x49011006 0x001149E0 0x49011146 0x001149E0
* button#16 VirtualKeycode 12, scancode 51E0
KEY PgDn 16 0x51011006 0x001251E0 0x51011146 0x001251E0
* button#17 VirtualKeycode 16, scancode 48E0
KEY Up 17 0x48011006 0x001648E0 0x48011146 0x001648E0
* button#18 VirtualKeycode 18, scancode 50E0
KEY Down 18 0x50011006 0x001850E0 0x50011146 0x001850E0
* button#19 VirtualKeycode 15, scancode 4BE0
KEY Left 19 0x4B011006 0x00154BE0 0x4B011146 0x00154BE0
* button#20 VirtualKeycode 17, scancode 4DE0
KEY Right 20 0x4D011006 0x00174DE0 0x4D011146 0x00174DE0
* button#21 VirtualKeycode 0D, scancode 4500
KEY Clear 21 0x5F011006 0x000D4500 0x5F011046 0x000D4500
* button#22 VirtualKeycode 1E, scancode 1C0D
KEY NewL 22 0x1C01000F 0x001E000D 0x1C01014E 0x001E1C0D
**********************************************************************
* Starting with v0.30, you can associate a character string with
* a button. By using the STRING keyword, you could associate a
* VM command string with a button, and have that command sent to
* your target window when you press a button. Or you could program
* a button to contain frequently-typed strings for use as a template
* in your favorite editor.
*
* The following lines show how this is done using the STRING keyword:
*
* STRING button_label button_number follow_up_button_number string
*
* NOTE that you not only assign a button_number, you also assign
* a "follow_up_button_number". This is the button number that
* you want BUTTONIT to send, after sending the characters in the
* string to the target window (usually the button number for Enter).
**********************************************************************
* Send the author a nice thank-you message (to his secondary ID ;-)
* button#23 Character String + Enter key (14)
STRING Thank 23 14 TELL DTS AT YKTVMV Thanks for the nice tool David!
* button#24 Character String + Enter key (14)
STRING FList 24 14 FILELIST * * a
|
Aggiungi un commento