Huntwindows V2.4 by Jörg Bublath ================================ COPYRIGHT: Huntwindows V2.4 is freely distributable. Huntwindows V2.4 is free to be spread on public-domain and shareware disks especially on Fred Fish's AmigaLibDisks, as long as they are sold for a reasonable charge that is less than US $6 or DM 8.- . For use in commercial products the permission of the author is required. Huntwindows V2.4 may be copied and distributed via electronic networks such as the Internet, also it may be moved on anonymous ftp-servers, mail-boxes or BBS's. The Copyright is still by the Author. You may use the source for your own non-commercial purposes, but you are not allowed to spread a changed version under the same name. If you think you have made a useful change contact me, so I may include it. REQUIREMENTS: Kickstart 2.0 (V36) or higher PREFACE: Coming with 2.0 you can make screens bigger than the visual size of your monitor. After I tried to catch windows like requesters etc. on my double-sized workbench, I got enough and wrote this little tool. It hangs itself into the VBI to find out which window in being activated and moves the screen to show the window in full view. Additionally there are some other related features like remembering and activating one window for each screen or bring the window or screen being activated to front. For full user-comfort, coming with version 2.0, Huntwindows is now a commodity and can placed into your WBStartup Drawer and has a Graphical User Interface. USAGE: Template: MOVE/S,SFRONT/S,WFRONT/S,DEFPUB/S,ALWAYS/S,REMWIN/S,MOVEMOUSE/S,CX_POPUP/S HADJ/K,VADJ/K,SCREEN/K,WINDOW/K or the same options as worbench tooltypes. MOVE: Enable ScreenMove() whenever a window is actived - this option should always be given, because it's the main purpose of the program :) SFRONT: Enable the ScreenToFront() whenever a window is activated WFRONT: Do an additional WindowToFront() for windows being activated. Due to problems this option won't affect Workbench Drawers. DEFPUB: If the Intuition FirstScreen is a PublicScreen it will automaticly set as DefaultPubScreen, so all windows opening on the default will use the FirstScreen. ALWAYS: Turns off the optimization done when a window is already totally visible. This will only have any affect if a HADJ or VADJ option is set. REMWIN: Remember the ActiveWindow for every screen. When switching through the screens Huntwindows will activate the last window that was active when it was the FirstScreen. A maximum of 64 different screens will be remembered - that should be enough, right? This option was based on TWA by Matthias Scheler. MOVEMOUSE: When you try to click on a close-gadget (or any other) of a window that is not completely visible, Huntwindows will move the window to show it completely before you have time to release the button and activate it. When this option is set Huntwindows will move the mouse with the screen, so it still is at the same position as before, and the window will really close (or whatever). This movement will only take place if the mouse was on a position that was already visible before scrolling - otherwise no mouse move will occur. CX_POPUP: Show the Graphical User Interface on startup. The Interface will be automaticly shown, if Huntwindows is already running. HADJ=: (only the first letter of the string is significant) Horizontal Adjustment: l : Left - means that IF scrolling is necessary, huntwindows will try to get the window adjusted to the left edge of the screen r : Same as above with the right edge c : Same as above but centering in the screen Everything else will switch the adjustment off VADJ=: (only the first letter of the string is significant) Horizontal Adjustment: t : Top - means that IF scrolling is necessary, huntwindows will try to get the window adjusted to the top edge of the screen b : Same as above with the buttom edge c : Same as above but centering in the screen Everything else will switch the adjustment off SCREEN= All actions will only take place if the DefaultTitle of the actual screen matches to the given pattern. If no pattern is given, all screens match. If you only want to exclude some screens, simply negate the pattern. For example: SCREEN=~(myscreen#?) The patternmatching is case insensitive. WINDOW= Same as screen, but checks the Title of the window that is going to be processed. From CLI you will have to start the program in the background via run nil: huntwindows [options] or whatever you like. If you want to quit Huntwindows simply break the task or quit it with the "Exchange" Commodity Program. From Workbench adjust the tooltypes and simply start by double-clicking. THE GRAPHICAL USER INTERFACE: By defining CX_POPUP, by starting Huntwindows a second time or by using "Show Interface" from the "Exchange" Commodity Program a GUI comes up. All options and tooltypes can be changed here. So you can play around to find out your configuration. If you already have placed Huntwindows in your wbstartup-drawer you may simply click "Save" to add all your options as tooltypes to the icon. When starting from CLI, the "Save"-gadget will be disabled. The tooltype "DONOTWAIT", which is necessary when placing Huntwindows into wbstartup is automaticly added on saving. When changing the pattern from the GUI, a check will be done when you press return. If there is an error in the pattern, a requester comes up and tells you so. If you do not re-edit the pattern until it is ok, will match nothing. which is equal to disabling Huntwindows. THANX: Michael Suelmann for help with the workbench/gadtools Markus 'ill' Illenseer for ideas and Aswarm (where I looked up how to do commodities) Georg 'Gucky' Hessmann und Matthias 'Tron' Scheler for the idea of the REMWIN option. TECHNICAL: For reaching this Huntwindows installs a Vertical-Blank interrupt-server, which tests if the ActiveWindow and the FirstScreen recorded by intuition differs from the last interrupt and then signals the main-task to move the display. Don't mind it taking away too much CPU time - if you have a look at the source at label 'Interrupt3' you will find that it doesn't do anyhing that is worth arguing about. HISTORY: Version 1.0: Worked with patching vectors, which didn't solve the problem of getting every active window completly. Version 1.1: Now uses VBI for catching active windows. Version 1.2: Added some new options and removed some bugs. Version 1.3: WBONLY and WFRONT option added. WFRONT will not make WindowToFront() on Backdrop and WBENCHWINDOW windows because it causes problems. Workbenchsupport added. Version 1.4: Crash when entering wrong arguments removed Added DEFPUB option Version 2.0: Enforcer Hits (old debugging stuff) removed. Added Commodity support. Added GUI. Version 2.1: Removed small bugs. Added REMWIN feature. Version 2.2: Removed bug in argument-order at CLI-call. Added MOVEMOUSE feature. Version 2.3: Added SCREEN and WINDOW option. Redesigned GUI. Version 2.4: Now tooltypes can be saved to icon. Added "Save", "About" and "GUI Popup" Gadgets to GUI. Removed crash at closedown and some minor bugs. TODO: -Hotkey to activate the GUI? BUGS: I hope none FINAL REMARKS: This tool is very nice to be used together with Windowshuffle by Stefan Sticht, for hopping through the windows and actually seeing them, when having a BIG workbench. Huntwindows could do a lot of more interesting things - if I could think about anything, so if you have ideas please contact me! For problems and ideas, reach me at: EMAIL: bublath@forwiss.uni-passau.de IRC: Skull SMAIL: Jörg Bublath Holzheimerstr. 4/E07 8390 Passau Germany Phone: Germany-0851-59947