Hello Sue s> Currently, this is assigned to a right click on the maximize button. s> However, I'm used to maximizing either by double-clicking the title s> bar, or left clicking the maximize button. I would rather not have to s> change my habits, so� Is there any way I get this script to run in s> place of the maximize command?
You can make something happen every time a window is maximised by any method including if it is maximised by left clicking the window's max button. First: Make a script in your powerpro\scripts folder called .HookMax which has these lines: If(arg(1) ne 1) quit wait for 50 if(not win.maxxed(arg(2))) quit If(win.left(arg(2)) gt 1600) win.size(arg(2), 1200, 1600) quit Note: on testing here, I found a short wait is necessary before checking whether the window is maxxed, to give the system time to maximise or unmaximise the window before the script checks it. If you find that it sometimes does the wrong thing on your system, increase the wait. Second: Make a new command list called HookWindowEvents. Only one item on the list, with only a left command: Command: .HookMax Parameter: (arg(1), arg(2), arg(3), arg(4)) For an explanation of how this works, see Help Index "hook events". Note: save the script file **before** creating the HookWindowEvents command list or you will get multiple error dialogs. If you also want something to happen whenever you unmaximise a window, change the script, using arg(2) as the CaptionList parameter of any commands which affect the window: If(arg(1) ne 1) quit wait for 50 if(not win.maxxed(arg(2)))do ;; whatever commands you want else If(win.left(arg(2)) gt 1600) win.size(arg(2), 1200, 1600) endif quit Note: the script will be run after every "window event" as listed in the hook events help topic, including every switch to another window, but it quits if the event was not maximise or restore. If you don't want that constant overhead, change your habits and learn to right click the max button. Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
