Sign in to follow this  
Followers 0
jackyyll

Silent mouse clicking

7 posts in this topic

Can someone please help me with this? I really need silent clicking would improve my both 100%. The one thats on the forums just doesnt work..

Share this post


Link to post
Share on other sites



Can someone please help me with this? I really need silent clicking would improve my both 100%. The one thats on the forums just doesnt work..

sorry... not sure what you mean by silent? Does ControlClick() work?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

I mean like, it clicks places w/o physicaly moving the mouse pointer.

Share this post


Link to post
Share on other sites

maybe ControlClick()

look it up in help

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I mean like, it clicks places w/o physicaly moving the mouse pointer.

like ControlClick() does.... ok, try ControlClick()....

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Larry made a UDF for something like this a while back using actual coords:

Opt("WinTitleMatchMode",4)
ClickInControl("left","Program Manager","","SysListView321",30,10)

Func 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
EndFunc

Func _MakeLong($LoWord,$HiWord)
  Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc

Warning

I'm not always able to get it to work with every window.


[center]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.[/center]

Share this post


Link to post
Share on other sites

Warning

I'm not always able to get it to work with every window.

for the others do you use ControlClick() ? /smirk sorry, too many energy drinks today...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0