I'm trying to get the position of a window. So I can write a script to double click to that.Is there any ways to do this :D
A:
You might be better off getting a handle to the window and using SendMessage() (or whatever the equivalent is on whatever platform you're on) to send a double-click message.
Drew Hall
2010-02-26 04:10:46
A:
The question has autohotkey tag, so I assume it's about autohotkey, right? If yes, all you need is WinGetPos command, allowing you to get x,y coordinates of the upper left corner of the window.
WinGetPos [, X, Y, Width, Height, WinTitle, WinText, ExcludeTitle, ExcludeText]
First four parameters are the names of variables, that will get info about the window. Last four parameters are standard for almost all autohotkey Win-commands, they identify the window.
Simple example:
SetTitleMatchMode 2 ; so that IfWinExist match window title not only from the start
IfWinExist, Notepad
WinGetPos, Xpos, Ypos ; Uses the window found above.
This will put the Notepad window position into Xpos, Ypos variables.
stansult
2010-03-05 09:55:12