Fend Posted November 7, 2008 Share Posted November 7, 2008 I am new to AutoIt so I apologize about the newbie questions. I have read the tutorial btw... I am using WinGetPos to get the (x,y) coord of the application I am using. The code I wrote is $size = WinGetPos("Nostale") $WindowX = $size[0] $WindowY = $size[1] MsgBox(0,"window x,y:",$WindowX&","&$WindowY) The resultant is 960,600 no matter where the windowed 1024by768 window is. From reading about this function it appears that it returns the (x,y) location and the heigth and width or the window...I am lost I guess I thought that if I moved the upper left corner of the window to say 100,100 that this function would return 100,100,1024,768 I like cookies? Link to comment Share on other sites More sharing options...
Valuater Posted November 7, 2008 Share Posted November 7, 2008 Try this.. Run('notepad.exe') WinWaitActive('') $size = WinGetPos("[active]") MsgBox(0, "Active window stats (x,y,width,height):", $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3]) re-size and move notepad, then run it again.. 8) Link to comment Share on other sites More sharing options...
Fend Posted November 7, 2008 Author Share Posted November 7, 2008 Works better with Exit! LOL opened like 200 I still am not getting this code up and running...your example however proved that it does in fact return the right values...it must have something to do with the fact it is a game(no game gaurd). I like cookies? Link to comment Share on other sites More sharing options...
Fend Posted November 7, 2008 Author Share Posted November 7, 2008 (edited) Dear lord it was me...was a misstype on the window name...<slowly goes back to hide in the shadows> Edited November 7, 2008 by Fend I like cookies? Link to comment Share on other sites More sharing options...
Valuater Posted November 7, 2008 Share Posted November 7, 2008 Well, as long as you found the answer.... it's all good 8) 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