|
You last visited: Today at 21:56
Advertisement
Anyone knows this?
Discussion on Anyone knows this? within the Conquer Online 2 forum part of the MMORPGs category.
04/10/2008, 09:38
|
#1
|
elite*gold: 0
Join Date: May 2007
Posts: 171
Received Thanks: 41
|
Anyone knows this?
Anyone knows what does the ControlFromPoint(X, Y, "ahk_id " id2,"", cX, cY) function in AHK? (X, Y, cX, cY are coordinates (cX, cY are not sure)). I didn't find it in the command list.
|
|
|
04/10/2008, 17:21
|
#2
|
elite*gold: 20
Join Date: Oct 2006
Posts: 2,707
Received Thanks: 2,525
|
yea sure i can answer u
the whole line is
Code:
[COLOR="Red"]hwnd [/COLOR]:= [COLOR="Blue"]ControlFromPoint[/COLOR](X, Y, "ahk_id " id,"", cX, cY)
PostMessage, 0x201, 0x8 | 0x1, cX & 0xFFFF | (cY & 0xFFFF) << 16,, ahk_id %[COLOR="Red"]hwnd[/COLOR]%
PostMessage, 0x202, 0x8 , cX & 0xFFFF | (cY & 0xFFFF) << 16,, ahk_id %[COLOR="Red"]hwnd[/COLOR]%
return
return
[COLOR="Blue"]ControlFromPoint[/COLOR](X, Y, WinTitle="", WinText="", ByRef cX="", ByRef cY="", ExcludeTitle="", ExcludeText="")
{
if !([COLOR="Red"]hwnd [/COLOR]:= WinExist(WinTitle, WinText, ExcludeTitle, ExcludeText))
return false
VarSetCapacity(pt,8)
VarSetCapacity(wi,60), NumPut(60,wi)
DllCall("GetWindowInfo","uint",hwnd,"uint",&wi)
NumPut(X + (w:=NumGet(wi,4,"int")) - (cw:=NumGet(wi,20,"int")), pt,0)
NumPut(Y + (h:=NumGet(wi,8,"int")) - (ch:=NumGet(wi,24,"int")), pt,4)
Loop {
child := DllCall("ChildWindowFromPointEx","uint",hwnd,"int64",NumGet(pt,0,"int64"),"uint",0x5)
if !child or child=hwnd
break
DllCall("MapWindowPoints","uint",hwnd,"uint",child,"uint",&pt,"uint",1)
hwnd := child
}
cX := NumGet(pt,0,"int")
cY := NumGet(pt,4,"int")
return [COLOR="Red"]hwnd[/COLOR]
}
Controlfrompoint is a function name that u declare
u can change it to whatever u want, even abc will work (but need to change both together)
same as hwnd
|
|
|
All times are GMT +2. The time now is 21:56.
|
|