home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 3
/
CDPDIII.bin
/
pd
/
commodities
/
windowshuffler
/
windowshuffle.doc
< prev
next >
Wrap
Text File
|
1992-10-07
|
11KB
|
281 lines
WindowShuffle
(Commodity)
by
Stefan Sticht
This program (binary), sourcecode, documentation is
PUBLIC DOMAIN.
You may do anything with it!
Purpose of this commodity:
--------------------------
With WindowShuffle you can map four functions to any keys:
activate next window
activate previous window
activate and bring next window to front
activate and bring previous window to front
Now you can 'walk' through the windows on your screen.
You may exclude windows from being activated or brought to front by
specifing their window title (wildcards allowed). Activating and
bringing to front of backdrop windows or of windows without a title
can be disabled. You may not find it usefull to use WindowShuffle
while you use autopoint, AutoActivate, SUNMouse or any other
commodity, which activates the window under the mousepointer.
Requirements:
-------------
This commodity requires at least Kickstart 37.* and Workbench 37.*.
Please check this out using About from the Workbench's Workbench menu.
How to start a commodity:
-------------------------
First there are two basically different ways to start a commodity:
via Workbench or via Shell.
Starting it via Workbench is extrem simple: just doubleclick on
its icon and the commodity gets started. Perhaps you might change
some parameters of the commodity. You do this with tool types. Tool
types can be changed by clicking at the commodities icon and selecting
Information from the Workbench's Icon menu. In the window which opens
you see a listview gadget in which all tool types are listed. Please
refer to your Workbench documentation on how to change this tool
types. Which parameters you can change for this specific commodity is
described below.
Please note that another double click on the commodity's icon
forces the commodity to quit, if it's already running. Running two
copies of WindowShuffle at the same time isn't useful and therefore
possible.
To start a commodity via shell you type in its name. If you get
an "Unknown command ???" error message, you have misspelled the
commodity's name or the commodity isn't in your current directory or
in the current search path. The easiest way is to change your current
directory to the location of the commodity using the CD command. You
can change parameters of a commodity by command line options. The
available options are listed with ? as the first parameter:
WindowShuffle ?
gives you a list of the command line options. The explanation of each
option is below. Starting the commodity once more while it is already
running forces the commodity to quit.
If you want the commodity to be started at every boot-up, it's
best to add this line to your User-Startup file:
<path>WindowShuffle <options>
Don't forget to replace <path> by the path to the commodities's
location and <options> by the options you want to change. For example
add this line if your commodity is located in the Tools drawer of your
boot disk:
Tools/WindowShuffle
Another way to start the commodity at every boot-up is to drag its
icon in the WBStartup drawer of your boot disk. Then the commodity
gets started as if you had double clicked on its icon. But you have
to add the tool type DONOTWAIT to the icon.
Using Exchange:
---------------
Exchange is the commodities controller program. With Exchange you can
control all commodities: you can kill, disable, enable, show and hide
commodities.
Start the Exchange program, which usually is in the Utilities
drawer of your boot disk, by double clicking its icon. Now you see a
list of the available commodities. Select the commodity you want to
control. The commodities title, description and status is shown now
below the listview gadget.
You can kill the commodity using the Kill gadget... If the
commodity has a window to open, in which you usually change some
parameters, you can open this window using Show. Hide closes this
window. WindowShuffle has no window.
Changeable parameters:
----------------------
CX_Priority:
------------
You can specify the priority of the Commodity within the commodities
queue using the tool type or commandline option CX_PRIORITY=<number>,
where <number> is the decimal value for the priority. Default
priority is 0.
NEXT_ACTIVE:
------------
With the tool type or commandline option NEXT_ACTIVE=<string> you can
specify the key, with which the next window will be activated.
<string> is an input description string as explained below. Default
is "NEXT_ACTIVE=lcommand lshift k" (left amiga key & left shift key &
k).
PREV_ACTIVE:
------------
With the tool type or commandline option PREV_ACTIVE=<string> you can
specify the key, with which the previous window will be activated.
<string> is an input description string as explained below. Default
is "PREV_ACTIVE=lcommand lshift j" (left amiga key & left shift key &
j).
NEXT_BOTH:
----------
With the tool type or commandline option NEXT_BOTH=<string> you can
specify the key, with which the next window will be activated and
brought in front of all other windows. <string> is an input
description string as explained below. Default is "NEXT_BOTH=lcommand
k" (left amiga key & k).
PREV_BOTH:
----------
With the tool type or commandline option PREV_BOTH=<string> you can
specify the key, with which the previous window will be activated and
brought in front of all other windows. <string> is an input
description string as explained below. Default is "PREV_BOTH=lcommand
j" (left amiga key & j).
BACKDROP:
---------
With the tool type or commandline option BACKDROP=YES|NO you can
specify wether backdrop windows (window which are always behind others
and which can't be brought to front) should be activated. YES|NO
means you may either use YES or NO, but nothing else. YES means,
activate them, NO, don't activate. Default is NO. WindowShuffle will
never try to bring backdrop windows to front.
NOWINTITLE:
-----------
With the tool type or commandline option NOWINTITLE=YES|NO you can
specify, wether window without a title should be activated and/or
brought to front. YES|NO means you may either use YES or NO, but
nothing else. YES means, activate and/or bring them to front.
Default is NO.
REFUSE:
-------
With the tool type or commandline option REFUSE=<string> you can
specify one or more titles of windows, which should never be brought
to front and never be activated. <string> is an AmigaDOS wildcard
string. All standard AmigaDOS wildcards are allowed like the ones
allowed by for example "dir". Just imagine window titles are file
names. Please consult your AmigaDOS manual for detailed description.
Important: upper and lower characters *are* distinguished, they
aren't the same!
Examples:
Don't activate the following titles: "Workbench", "Clock" and all
disk windows (note that all disk windows have the keywords "full"
"free" "use"):
REFUSE=(Workbench|Clock|#?full#?free#?use)
If you *only* want to activate windows which name begins with "Shell":
REFUSE=~(Shell#?)
If you only don't want to bring the Workbench window to front (when
in non backdrop mode):
REFUSE=Workbench
Input description strings
-------------------------
With input description strings you can specify almost any input
action, for example the action lshift f1, which means that pressing
the left shift and the f1 key together is the action. In this
commodity you can specify the action to open the commodity's window,
as described above.
Input description strings have the following template:
[class] (([-]qual)|syn)* [[-]upstroke] [highmap|ANSIcode]
(* means zero or more occurances of the of the expression in brackets)
class is one of the following strings:
rawkey, rawmouse, event, pointerpos, timer, newprefs,
diskremoved, diskinserted.
If not specified, the class is taken to be "rawkey".
qual is one of the strings:
lshift, rshift, capslock, control, lalt, ralt, lcommand,
rcommand, numericpad, repeat, midbutton, rbutton, leftbutton,
relativemouse
A preceding '-' means that the value of the corresponding
qualifier is to be considered irrelevant.
syn (synonym) is one of the strings: shift, caps, alt
shift means "left or right shift"
caps means "shift or capslock"
alt means "either alt key"
upstroke (literally "upstroke")
if this token is absent, only downstrokes are considered
for rawmouse (mousebuttons) and rawkey events. If it is
present alone, only upstrokes count. If it preceded by
'-' it means that both up and down strokes are included.
highmap one of the strings:
comma, space, backspace, tab, enter, return, esc, del, up,
down, right, left, help, f1, f2, f3, f4, f5, f6, f7, f8, f9,
f10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, (, ), /, *, -, +
ansicode a single character token is interpreted as a character code,
which is looked up in the system default keymap.
Some full examples:
-------------------
The defaults (too show how you would specify them):
WindowShuffle CX_PRIORITY=0 "NEXT_ACTIVATE=lcommand lshift k"
"PREV_ACTIVATE=lcommand lshift j" "NEXT_BOTH=lcommand k"
"PREV_BOTH=lcommand j" BACKDROP=NO NOWINTITLE=NO
defaults + refuse title "Workbench":
WindowShuffle Refuse=Workbench
refuse also disk drawers:
WindowShuffle Refuse=(Workbench|#?full#?free#?use)
refuse all window which don't have a 'W' as their first character;
use right amiga key (with right shift) and cursor down/up:
WindowShuffle "NEXT_ACTIVATE=rcommand rshift down"
"PREV_ACTIVATE=rcommand rshift up" "NEXT_BOTH=rcommand down"
"PREV_BOTH=rcommand up" REFUSE=~(W#?)
Send bug-reports, enhancement-requests, questions, gifts(!) to:
---------------------------------------------------------------
Stefan Sticht
Bibereckerweg 40a
D-8390 Passau 18
FRG
or (better) EMail to:
sticht@edith.deg.sub.org
Fido-Net: Stefan Sticht (2:246/200.4)
Please include the version number of the commodity in every bug report
You get the version number using the Version command in the Shell:
Version [<path>]<commodity>