Huntwindows V2.1 by Jörg Bublath ================================ COPYRIGHT: Huntwindows V2.1 is freely distributable. Huntwindows V2.1 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.1 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,WBONLY/S,DEFPUB/S,ALWAYS/S, CX_POPUP/S,HADJ/K,VADJ/K,REMWIN/S from CLI 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. WBONLY : Only affect windows on the Workbenchscreen - if something happens on another screen it will be ignored. This option does not take affect on DEFPUB and REMWIN because these options live on having other screens. 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. CX_POPUP: Show the Graphical User Interface on startup. The Interface will be automaticly shown, if Huntwindows is already running. HADJ=: 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=: 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 top edge c : Same as above but centering in the screen Everything else will switch the adjustment off 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. 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. All the options can be changed by simply using "Show Interface" from the "Exchange" Commodity Program. THANX: Michael Suelmann for help with the workbench/gadtools Christian 'cschneid' Schneider for technical support and finding bugs without ever wanting to use this program. 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. 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