Drewster Posted July 20, 2008 Report Share Posted July 20, 2008 I want to move a window to the bottom left if it's not in the right place AND if it's not minimized. 1- What's the best way to check if it's in the bottom-left position? I am checking to see if it's on the left. 2- What's the best way to tell the state (minimimized, maximized, normal) of a window? I want the macro to trigger if it's not minimized. Currently my macro triggers if it's the active window. If two programs are running, one is the program I want to resize, and I close the other then the macro runs even if it's minimized. Here's my macro: Variable Set Integer N2 from Left of Window If N2 <>0 If Window <mytitle> is on top Window Reposition current window to Bottom Left End If End If Thank you for any help you can provide. I seached the KB at macros.com but came up empty. -Drew Quote Link to comment Share on other sites More sharing options...
stan Posted July 29, 2008 Report Share Posted July 29, 2008 What's the best way to check if it's in the bottom-left position? I am checking to see if it's on the left. The Variable Set Integer %N2% from Left of Window command finds the position of the left side of the window. The Variable Set Integer %N3% from Top of Window finds the position of the top of the window. Based on your screen dimensions and knowing what the size of the window should be, you can determine if the window is in the lower left hand corner. Use the Variable Modify Integer command to do the math. What's the best way to tell the state (minimimized, maximized, normal) of a window? I want the macro to trigger if it's not minimized. Currently my macro triggers if it's the active window. If two programs are running, one is the program I want to resize, and I close the other then the macro runs even if it's minimized. If there are no other windows displayed on the screen you can try using the following two commands: Variable Set Integer %N1% from Width of Window and Variable Set Integer %N2% from Height of Window These will give you the dimensions of the current window. You can tell if the window is maximized or standard size based on the dimensions by using the If Variable command. A minimized window provided odd values. But it seemed to provide the same values every time for each window I tested. The odd values should let you know if the window is minimized. You willl need to experiment with the window you are using to see what values are saved when minimized. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.