t0ddie Posted February 16, 2010 Share Posted February 16, 2010 (edited) This is a problem with a Diablo II window.I am not making a bot, or asking for help with one. I just noticed a strange behavior with this particular window and was wondering if there was a way to compensate for this behavior.so I am trying to move the mouse in a certain place on the screen. for testing i am just trying the center of the screen.Here is an example of the problemhttp://tinypic.com/player.php?v=2h6tufn&s=6this code should put the mouse right in the middle of the screen and it does in regular window mode and in fullscreen modeOpt("MouseCoordMode", 2) sleep(5000) $size = WinGetClientSize("[active]") MouseMove($size / 2,$size / 2,0)however when you maximize the window in window mode the cursor coordinates start to misalign as you move it to the right and does not end up in the middle of the screen (as you can see in the video).since the mouse coordinates do not seem to work in the window when its maximized,is there some formula where you can get the users screen resolution (@destopwidth/height), and window size and position and use that to determine the center of the window according to the game cursor (not according to the windows cursor)? I want to always click in the middle of the window without having to write a hardcoded value for each possible window size/position and screen resolution if at all possible. this only seems to happen when in window mode and maximized but it is in interesting phenomenon and I would like to make a workaround for it. Edited February 18, 2010 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now