TsunamiZ Posted June 2, 2007 Report Share Posted June 2, 2007 How about add an option to mouse move for center mouse cursor to screen / window? This would be better than entering screen coordinates since it can center mouse cursor to any screen resolution and window size. Quote Link to comment Share on other sites More sharing options...
wbeldman Posted June 5, 2007 Report Share Posted June 5, 2007 You can calculate the center position yourself, assign screen width and height with Variable Set Integer. How can a macro determine the user's screen resolution is? (800 x 600, etc.) And of course divide by 2... Quote Link to comment Share on other sites More sharing options...
TsunamiZ Posted June 6, 2007 Author Report Share Posted June 6, 2007 but problem with that is then the macro doesn't center for ANY screen resolution. it only works for one... Quote Link to comment Share on other sites More sharing options...
kevin Posted June 6, 2007 Report Share Posted June 6, 2007 but problem with that is then the macro doesn't center for ANY screen resolution. it only works for one...It works for whatever screen resolution or window size is in effect when the macro runs. I am curious why you need to move the mouse to the center of the screen. Could you explain? Quote Link to comment Share on other sites More sharing options...
TsunamiZ Posted June 17, 2007 Author Report Share Posted June 17, 2007 it may work for moving the mouse for various resolutions but it will not always be centered for every resolution because the coordinates are different for each resolution. i use center mouse cursor for certain windowed programs that dont remember their window position. so i make a macro that centers the window and then centers the cursor. i find this convenient since it saves me some mouse movment because I use high resolution desktop on my monitor. and i want this macro to work center properly for any resolution i use. Quote Link to comment Share on other sites More sharing options...
kevin Posted June 17, 2007 Report Share Posted June 17, 2007 it may work for moving the mouse for various resolutions but it will not always be centered for every resolution because the coordinates are different for each resolution.Your macro can obtain the resolution of the screen and the size of a window. Combine that with a couple of div or mult commands and you can calculate the center. See the following commands:Variable Set Integer %N1% from Top of Window Variable Set Integer %N2% from Left of Window Variable Set Integer %N3% from Width of Window Variable Set Integer %N4% from Height of Window Variable Set Integer %N5% from Screen Width Variable Set Integer %N6% from Screen Height Variable Modify Integer: %N1% = %N1% * %N2% Variable Modify Integer: %N1% = %N1% / %N2% 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.