yellowpower Posted November 20, 2010 Share Posted November 20, 2010 thanks! Link to comment Share on other sites More sharing options...
Tvern Posted November 20, 2010 Share Posted November 20, 2010 MouseCoordMode:Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:0 = relative coords to the active window1 = absolute screen coordinates (default)2 = relative coords to the client area of the active windowWhat is it you don't understand?Opt("MouseCoordMode",0) means position 0x0 is the top left corner of the active window, Opt("MouseCoordMode",1) means position 0x0 is the top left corner of the screen. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 20, 2010 Developers Share Posted November 20, 2010 thanks!Helpfile ? Thanks SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
yellowpower Posted November 20, 2010 Author Share Posted November 20, 2010 What is it you don't understand?Opt("MouseCoordMode",0) means position 0x0 is the top left corner of the active window, Opt("MouseCoordMode",1) means position 0x0 is the top left corner of the screen.sorry, I mean 0 and 2 Link to comment Share on other sites More sharing options...
yellowpower Posted November 20, 2010 Author Share Posted November 20, 2010 I tried 0 and 2 with a active window, but it all goes to the same point Link to comment Share on other sites More sharing options...
Tvern Posted November 20, 2010 Share Posted November 20, 2010 Depends on the window you use. Most windows have a border around it. MouseCoordMode 0 gets the outside of the top left corner of that border, while MouseCoordMode 2 gets the inside of the top left corner. (Or more accurate the top left corner of the functional part of the window) The difference is usually only 2-5 pixels. The thickness of the border is affected by the OS and the visual style used, so it's usefull to have a MouseCoordMode that is constant regardless of the thickness of the border. Link to comment Share on other sites More sharing options...
yellowpower Posted November 20, 2010 Author Share Posted November 20, 2010 Depends on the window you use.Most windows have a border around it. MouseCoordMode 0 gets the outside of the top left corner of that border, while MouseCoordMode 2 gets the inside of the top left corner. (Or more accurate the top left corner of the functional part of the window)The difference is usually only 2-5 pixels.The thickness of the border is affected by the OS and the visual style used, so it's usefull to have a MouseCoordMode that is constant regardless of the thickness of the border.Thanks!! Link to comment Share on other sites More sharing options...
Tvern Posted November 20, 2010 Share Posted November 20, 2010 Here's an example that demonstrates it clearly: $PID = Run("NotePad.exe") $hWnd = WinWait("[CLASS:Notepad]","") WinActivate($hWnd,"") WinWaitActive($hWnd,"") Opt("MouseCoordMode",2) MouseMove(0,0,1) Sleep(1000) Opt("MouseCoordMode",0) MouseMove(0,0,1) Sleep(1000) Opt("MouseCoordMode",2) MouseMove(0,0,1) Sleep(1000) Opt("MouseCoordMode",0) MouseMove(0,0,1) Sleep(1000) ProcessClose($PID) I din't actually expect it to exlude the menubar as well, but it does. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now