Sign in to follow this  
Followers 0
pezo89

quickfix of diamond scan

1 post in this topic

Hey, iv tried but failed over and over...

does anyone know how i can "flip" this scan? it is going buttom -> top, but i want it to go top ->buttom =/

Global $Paused
sleep ("1000")
HotKeySet("{Pause}", "TogglePause")
HotKeySet("{Insert}", "Terminate")
sleep ("2000")


send ("{Pause}")

;
Opt("MouseClickDelay", 1) ; 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(276, 431, 885, 125, 1484, 430, 881, 735)


; For Diamond shape $xL, $yL - Left x,y coordinate etc.
Func _DiamondScan($xL, $yL, $xTop, $yTop, $xR, $tR, $xB, $yB, $xSpacing =30, $ySpacing = 30)
    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)
            mouseclick("Left", $x1, $y1, 1,1)
        Next
    Next
    sleep (3000)
    mouseclick ("Left", 1122, 16,2)
EndFunc   ;==>_DiamondScan

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







Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ;toolTip('Script -  "Scriptet er - AV"',0, 40)
    WEnd
    ToolTip("")
EndFunc

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