Sign in to follow this  
Followers 0
pezo89

requesting help regarding mouseclicks within an area

4 posts in this topic

is there a solution to my little issue?

hey guys, just wondering, how can i use mouseclick within the area?

code im trying to get to work is this

send ("{Pause}")
Opt("MouseClickDelay", 5) ; adjust as needed
; Alters the length of the brief pause in between mouse clicks.
; Time in milliseconds to pause (default=10).

Opt("MouseClickDownDelay", 1) ; adjust as needed
; Alters the length a click is held down before release.
; Time in milliseconds to pause (default=10).

HotKeySet("{ESC}", "Terminate")


For $y = 72 To 839 Step 35
    For $x = 0 To 1759 Step 25
        MouseClick("left", $x, $y, 1, 0)
        ;MouseMove($x, $y, 5)
    Next
Next

however, i kinda need it to go be tilted like a few degrees >_< :(

Posted Image

Share this post


Link to post
Share on other sites



bump >_

Share this post


Link to post
Share on other sites

is there a solution to my little issue?

hey guys, just wondering, how can i use mouseclick within the area?

code im trying to get to work is this

send ("{Pause}")
Opt("MouseClickDelay", 5) ; adjust as needed
; Alters the length of the brief pause in between mouse clicks.
; Time in milliseconds to pause (default=10).

Opt("MouseClickDownDelay", 1) ; adjust as needed
; Alters the length a click is held down before release.
; Time in milliseconds to pause (default=10).

HotKeySet("{ESC}", "Terminate")


For $y = 72 To 839 Step 35
    For $x = 0 To 1759 Step 25
        MouseClick("left", $x, $y, 1, 0)
        ;MouseMove($x, $y, 5)
    Next
Next

however, i kinda need it to go be tilted like a few degrees :P:P

Try this.

;
Opt("MouseClickDelay", 5) ; adjust as needed
; Alters the length of the brief pause in between mouse clicks.
; Time in milliseconds to pause (default=10).

Opt("MouseClickDownDelay", 1) ; adjust as needed
; Alters the length a click is held down before release.
; Time in milliseconds to pause (default=10).

HotKeySet("{ESC}", "Terminate")

_DiamondScan(215, 490, 640, 278, 1063, 490, 640, 705)

; For Diamond shape $xL, $yL - Left x,y coordinate etc.
Func _DiamondScan($xL, $yL, $xTop, $yTop, $xR, $tR, $xB, $yB, $xSpacing = 12, $ySpacing = 12)
    Local $width = $xR - $xL
    Local $Height = $yB - $yTop
    Local $rat = $width / $Height
    Local $x1, $y1, $Grad = ($Height - $Height / $rat) / ($width - $width / $rat)
    ConsoleWrite("$Height " & $Height & @CRLF)
    ConsoleWrite("@DesktopWidth / 2 " & $width / $rat & @CRLF)
    For $y = $Height To $Height / $rat Step -Int(($Height - $Height / $rat) / $ySpacing)
        For $x = ($width / $rat) To $width Step Int(($width - $width / $rat) / $xSpacing)

            $x1 = $x + ($y - $Height) / $Grad + $xL
            $y1 = $y - ($x - $width / $rat) * $Grad + $yTop

            ;MouseClick("left", $x1, $y1, 1, 0)
            MouseMove($x1, $y1, 1)
        Next
    Next
EndFunc   ;==>_DiamondScan

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate
;

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Try this.

;
Opt("MouseClickDelay", 5) ; adjust as needed
; Alters the length of the brief pause in between mouse clicks.
; Time in milliseconds to pause (default=10).

Opt("MouseClickDownDelay", 1) ; adjust as needed
; Alters the length a click is held down before release.
; Time in milliseconds to pause (default=10).

HotKeySet("{ESC}", "Terminate")

_DiamondScan(215, 490, 640, 278, 1063, 490, 640, 705)

; For Diamond shape $xL, $yL - Left x,y coordinate etc.
Func _DiamondScan($xL, $yL, $xTop, $yTop, $xR, $tR, $xB, $yB, $xSpacing = 12, $ySpacing = 12)
    Local $width = $xR - $xL
    Local $Height = $yB - $yTop
    Local $rat = $width / $Height
    Local $x1, $y1, $Grad = ($Height - $Height / $rat) / ($width - $width / $rat)
    ConsoleWrite("$Height " & $Height & @CRLF)
    ConsoleWrite("@DesktopWidth / 2 " & $width / $rat & @CRLF)
    For $y = $Height To $Height / $rat Step -Int(($Height - $Height / $rat) / $ySpacing)
        For $x = ($width / $rat) To $width Step Int(($width - $width / $rat) / $xSpacing)

            $x1 = $x + ($y - $Height) / $Grad + $xL
            $y1 = $y - ($x - $width / $rat) * $Grad + $yTop

            ;MouseClick("left", $x1, $y1, 1, 0)
            MouseMove($x1, $y1, 1)
        Next
    Next
EndFunc   ;==>_DiamondScan

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate
;

Works like a charm :( thx alot >_< Edited by pezo89

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