Golbez Posted January 25, 2007 Posted January 25, 2007 (edited) is there a away 2 set the coords of were it will click xD i cant figure it out edit: _mousetrap dont work Edited January 25, 2007 by Golbez
Moderators SmOke_N Posted January 25, 2007 Moderators Posted January 25, 2007 is there a away 2 set the coords of were it will click xDi cant figure it out edit: _mousetrap dont work No.... is the answer to your question.A solution however could be _ClickInControl() by Larry.. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Golbez Posted January 25, 2007 Author Posted January 25, 2007 No.... is the answer to your question.A solution however could be _ClickInControl() by Larry..thanx smoke
Golbez Posted January 25, 2007 Author Posted January 25, 2007 http://www.autoitscript.com/forum/index.ph...=ClickInControlFunc ClickInControl( $szLR, $szTitle, $szText, $szControl, $nX, $nY ) If $szLR <> "left" And $szLR <> "right" Then Return 0 $hWnd = ControlGetHandle( $szTitle, $szText, $szControl ) If @error Then Return 0 $hWndDad = WinGetHandle( $szTitle, $szText ) If @error Then Return 0 $me = DLLCall( "kernel32.dll", "long", "GetCurrentThreadId" ) $you = DLLCall( "user32.dll", "long", "GetWindowThreadProcessId", "hwnd", $hWndDad, "long_ptr", 0) $coord = _MakeLong( $nX, $nY ) If $szLR = "left" Then $msg1 = 0x0201;WM_LBUTTONDOWN $msg2 = 0x0202;WM_LBUTTONUP $i = 0x0001;MK_LBUTTON Else $msg1 = 0x0204;WM_RBUTTONDOWN $msg2 = 0x0205;WM_RBUTTONUP $i = 0x0002;MK_RBUTTON EndIf $ret = DLLCall("user32.dll","int","AttachThreadInput","long",$me[0],"long",$you[0],"int",1) If $ret[0] = 0 Then Return 0 $ret = DLLCall("user32.dll","long","PostMessage","hwnd",$hWnd,"int",$msg1,"int",$i,"int",$coord) If $ret[0] = 0 Then Return 0 Sleep(100) $ret = DLLCall("user32.dll","long","PostMessage","hwnd",$hWnd,"int",$msg2,"int",0,"int",$coord) If $ret[0] = 0 Then Return 0 DLLCall("user32.dll","int","AttachThreadInput","long",$me[0],"long",$you[0],"int",0) If $ret[0] = 0 Then Return 0 Return 1 EndFuncthis smoke?
Golbez Posted January 25, 2007 Author Posted January 25, 2007 (edited) nvm found it Edited January 25, 2007 by Golbez
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