• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

AutoIT ControlClick + MouseClick for background or windowed mode windows

Status
Not open for further replies.

DDoSer

The Real DDoSer
User
Joined
Oct 9, 2013
Messages
352
Reputation
0
Reaction score
4,578
Points
243
Credits
0
‎11 Years of Service‎
51%
[HIDE-THANKS]

Code:
>Opt("MouseCoordMode", 2)


Sleep(2000)
MsClick("Window tittle","","","left",1,398, 349) ;Set window tittle for controlclick
Sleep(2000)
MsClick("Window tittle","","","left",1,398, 349) ;            >>


Func MsClick($tittle, $text, $controlid, $clickType, $clicks = 1, $x = 1, $y = 1)
$coord = UiRatio($x, $y)
ControlClick($tittle, $text, $controlid, $clickType, $clicks, $coord[0], $coord[1])
EndFunc   ;==>MsClick

Func UiRatio($_x, $_y)
Dim $return[2]
$size = WinGetClientSize("[CLASS:Window tittle]") ; Must set so we can get windows' size
$return[0] = $size[1] * ($_x / $size[0])
$return[1] = $size[1] * ($_y / $size[1])
Return $return
EndFunc   ;==>UiRatio

#cs
Sleep(2000)
_MsClick(318, 542)
Sleep(2000)
_MsClick(318, 542)

Func _MsClick($x, $y, $button = "left")
$coord = UiRatio($x, $y)
MouseClick($button, $coord[0], $coord[1])
EndFunc   ;==>_randomclick
#ce
[/HIDE-THANKS]

 
Re: ControlClick + MouseClick for background or windowed mode windows

exactly what i needed i have been looking for soooo long :D

 
Status
Not open for further replies.
Back
Top