Sean wrote: > You may try: > win.setpreviousfocus > win.getfocus Yes that works :-) My test1.powerpro script does:
local h = win.getfocus win.debug(h) win.setpreviousfocus local h = win.getfocus win.debug(h) When I run that script from a hotkey, debug shows: 591706 then 591706 When I run the same script from a bar button, debug shows: 0 then 591706 Now the only remaining problem is about how different apps give a different respose to min/max/etc commands being sent to their focussed child window. As I indicated in a previous message, I think: "so what!" if its only about MaxRestore and Max and Restore. However I can imagine lots of interesting other uses for the new win.getfocus and win.setpreviousfocus -- not related to MDI -- such as before sending keys or before doing things like grabbing text from the screen by sending several Shift+LeftArrow to select some text then Ctrl-C, and other things I can't yet imagine. Hopefully, such uses would not be troubled by the different ways different apps do MDI. ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM --------------------------------------------------------------------~-> 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/
