Sign in to follow this  
Followers 0
PickPocketz

Shorter Script w/ Same Effect

6 posts in this topic

I have a program i'm working on that has a 200px x 200px size GUI Box filled by a grid of 5px x 5px graphic boxes that will change color according to an area under your mouse cursor. It's pretty much a magnifying glass in a sense. The problem i'm having is instead of having a line of code for each graphic box I want to roll them through an array. In return i want the array to spit out the GUICtrlCreateGraphic() and actually create the boxes that way w/ their own variable names.

(My First and Smaller Version)

Here is my script:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Misc.au3>
#include <EditConstants.au3>

;Window Width : Window Height : Window X : Window Y
Global $Main_Win_Spec[4] = [100, 100, @DesktopWidth / 2 - 50, @DesktopHeight - 105]

;ESC : Left Bracket : Right Bracket
Global $Keys[3] = ["1B", "DB", "DD"]

;Grid Box
Global $Grid_Pos[6] = [20, 0, 19, 38, 57, 76]

;Mouse X Position Modifier
Global $mLine[5]

Main()

Func Main()
    
    GUICreate("Image Recognition-", $Main_Win_Spec[0], $Main_Win_Spec[1], $Main_Win_Spec[2], $Main_Win_Spec[3], $WS_DISABLED + $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor(0xff5500)
    
    
    $Grid_Box1A = GUICtrlCreateGraphic($Grid_Pos[1], $Grid_Pos[1], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box2A = GUICtrlCreateGraphic($Grid_Pos[2], $Grid_Pos[1], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box3A = GUICtrlCreateGraphic($Grid_Pos[3], $Grid_Pos[1], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box4A = GUICtrlCreateGraphic($Grid_Pos[4], $Grid_Pos[1], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box5A = GUICtrlCreateGraphic($Grid_Pos[5], $Grid_Pos[1], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box1B = GUICtrlCreateGraphic($Grid_Pos[1], $Grid_Pos[2], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box2B = GUICtrlCreateGraphic($Grid_Pos[2], $Grid_Pos[2], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box3B = GUICtrlCreateGraphic($Grid_Pos[3], $Grid_Pos[2], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box4B = GUICtrlCreateGraphic($Grid_Pos[4], $Grid_Pos[2], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box5B = GUICtrlCreateGraphic($Grid_Pos[5], $Grid_Pos[2], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box1C = GUICtrlCreateGraphic($Grid_Pos[1], $Grid_Pos[3], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box2C = GUICtrlCreateGraphic($Grid_Pos[2], $Grid_Pos[3], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box3C = GUICtrlCreateGraphic($Grid_Pos[3], $Grid_Pos[3], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box4C = GUICtrlCreateGraphic($Grid_Pos[4], $Grid_Pos[3], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box5C = GUICtrlCreateGraphic($Grid_Pos[5], $Grid_Pos[3], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box1D = GUICtrlCreateGraphic($Grid_Pos[1], $Grid_Pos[4], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box2D = GUICtrlCreateGraphic($Grid_Pos[2], $Grid_Pos[4], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box3D = GUICtrlCreateGraphic($Grid_Pos[3], $Grid_Pos[4], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box4D = GUICtrlCreateGraphic($Grid_Pos[4], $Grid_Pos[4], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box5D = GUICtrlCreateGraphic($Grid_Pos[5], $Grid_Pos[4], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box1E = GUICtrlCreateGraphic($Grid_Pos[1], $Grid_Pos[5], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box2E = GUICtrlCreateGraphic($Grid_Pos[2], $Grid_Pos[5], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box3E = GUICtrlCreateGraphic($Grid_Pos[3], $Grid_Pos[5], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box4E = GUICtrlCreateGraphic($Grid_Pos[4], $Grid_Pos[5], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    $Grid_Box5E = GUICtrlCreateGraphic($Grid_Pos[5], $Grid_Pos[5], $Grid_Pos[0], $Grid_Pos[0])
    GUICtrlSetBkColor(-1, 0xff0000)
    GUICtrlSetColor(-1, 0)
    
    
    GUISetState()
    
    
    While 1
        
        $mPos = MouseGetPos()
        
        $Color_1A = PixelGetColor($mPos[0] - 2, $mPos[1] - 2)
        $Color_1B = PixelGetColor($mPos[0] - 1, $mPos[1] - 2)
        $Color_1C = PixelGetColor($mPos[0], $mPos[1] - 2)
        $Color_1D = PixelGetColor($mPos[0] + 1, $mPos[1] - 2)
        $Color_1E = PixelGetColor($mPos[0] + 2, $mPos[1] - 2)
        
        $Color_2A = PixelGetColor($mPos[0] - 2, $mPos[1] - 1)
        $Color_2B = PixelGetColor($mPos[0] - 1, $mPos[1] - 1)
        $Color_2C = PixelGetColor($mPos[0], $mPos[1] - 1)
        $Color_2D = PixelGetColor($mPos[0] + 1, $mPos[1] - 1)
        $Color_2E = PixelGetColor($mPos[0] + 2, $mPos[1] - 1)
        
        $Color_3A = PixelGetColor($mPos[0] - 2, $mPos[1])
        $Color_3B = PixelGetColor($mPos[0] - 1, $mPos[1])
        $Color_3C = PixelGetColor($mPos[0], $mPos[1])
        $Color_3D = PixelGetColor($mPos[0] + 1, $mPos[1])
        $Color_3E = PixelGetColor($mPos[0] + 2, $mPos[1])
        
        $Color_4A = PixelGetColor($mPos[0] - 2, $mPos[1] + 1)
        $Color_4B = PixelGetColor($mPos[0] - 1, $mPos[1] + 1)
        $Color_4C = PixelGetColor($mPos[0], $mPos[1] + 1)
        $Color_4D = PixelGetColor($mPos[0] + 1, $mPos[1] + 1)
        $Color_4E = PixelGetColor($mPos[0] + 2, $mPos[1] + 1)
        
        $Color_5A = PixelGetColor($mPos[0] - 2, $mPos[1] + 2)
        $Color_5B = PixelGetColor($mPos[0] - 1, $mPos[1] + 2)
        $Color_5C = PixelGetColor($mPos[0], $mPos[1] + 2)
        $Color_5D = PixelGetColor($mPos[0] + 1, $mPos[1] + 2)
        $Color_5E = PixelGetColor($mPos[0] + 2, $mPos[1] + 2)
        
        
        GUICtrlSetBkColor($Grid_Box1A, $Color_1A)
        GUICtrlSetBkColor($Grid_Box2A, $Color_1B)
        GUICtrlSetBkColor($Grid_Box3A, $Color_1C)
        GUICtrlSetBkColor($Grid_Box4A, $Color_1D)
        GUICtrlSetBkColor($Grid_Box5A, $Color_1E)
        
        GUICtrlSetBkColor($Grid_Box1B, $Color_2A)
        GUICtrlSetBkColor($Grid_Box2B, $Color_1B)
        GUICtrlSetBkColor($Grid_Box3B, $Color_1C)
        GUICtrlSetBkColor($Grid_Box4B, $Color_1D)
        GUICtrlSetBkColor($Grid_Box5B, $Color_1E)

        GUICtrlSetBkColor($Grid_Box1C, $Color_3A)
        GUICtrlSetBkColor($Grid_Box2C, $Color_1B)
        GUICtrlSetBkColor($Grid_Box3C, $Color_1C)
        GUICtrlSetBkColor($Grid_Box4C, $Color_1D)
        GUICtrlSetBkColor($Grid_Box5C, $Color_1E)

        GUICtrlSetBkColor($Grid_Box1D, $Color_4A)
        GUICtrlSetBkColor($Grid_Box2D, $Color_1B)
        GUICtrlSetBkColor($Grid_Box3D, $Color_1C)
        GUICtrlSetBkColor($Grid_Box4D, $Color_1D)
        GUICtrlSetBkColor($Grid_Box5D, $Color_1E)

        GUICtrlSetBkColor($Grid_Box1E, $Color_5A)
        GUICtrlSetBkColor($Grid_Box2E, $Color_1B)
        GUICtrlSetBkColor($Grid_Box3E, $Color_1C)
        GUICtrlSetBkColor($Grid_Box4E, $Color_1D)
        GUICtrlSetBkColor($Grid_Box5E, $Color_1E)
        
        If _IsPressed($Keys[0]) Then
            
            Exit
            
        EndIf
        
    WEnd
    
EndFunc

All I really want to do is change the 3 sets of code that are pretty much repeated 25 times into 3 small loops into arrays or something along those lines... Unless there is an even easier way.

Share this post


Link to post
Share on other sites



I did not do it all for you,this is to gie you the jist, and it will not work as you expect unless you finish it in a similar fashion.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <EditConstants.au3>

;Window Width : Window Height : Window X : Window Y
Global $Main_Win_Spec[4] = [100, 100, @DesktopWidth / 2 - 50, @DesktopHeight - 105]

;ESC : Left Bracket : Right Bracket
Global $Keys[3] = ["1B", "DB", "DD"]

;Grid Box
Global $Grid_Pos[6] = [20, 0, 19, 38, 57, 76]

;Mouse X Position Modifier
Global $mLine[5]

Main()

Func Main()
    Local $aGridBox[25]
    Local $y = 1
    GUICreate("Image Recognition-", $Main_Win_Spec[0], $Main_Win_Spec[1], $Main_Win_Spec[2], $Main_Win_Spec[3], $WS_DISABLED + $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor(0xff5500)
    For $i = 0 To UBound($aGridBox) - 1
        For $j = 1 To 5
            If $y = 6 Then $y =1
            $aGridBox[$i] = GUICtrlCreateGraphic($Grid_Pos[$j], $Grid_Pos[$y], $Grid_Pos[0], $Grid_Pos[0])
            GUICtrlSetBkColor(-1, 0xff0000)
            GUICtrlSetColor(-1, 0)
        Next
        $y += 1
    Next

    GUISetState()

    While 1

        $mPos = MouseGetPos()
        Sleep(10)

        $Color_1A = PixelGetColor($mPos[0] - 2, $mPos[1] - 2)
        $Color_1B = PixelGetColor($mPos[0] - 1, $mPos[1] - 2)
        $Color_1C = PixelGetColor($mPos[0], $mPos[1] - 2)
        $Color_1D = PixelGetColor($mPos[0] + 1, $mPos[1] - 2)
        $Color_1E = PixelGetColor($mPos[0] + 2, $mPos[1] - 2)

        $Color_2A = PixelGetColor($mPos[0] - 2, $mPos[1] - 1)
        $Color_2B = PixelGetColor($mPos[0] - 1, $mPos[1] - 1)
        $Color_2C = PixelGetColor($mPos[0], $mPos[1] - 1)
        $Color_2D = PixelGetColor($mPos[0] + 1, $mPos[1] - 1)
        $Color_2E = PixelGetColor($mPos[0] + 2, $mPos[1] - 1)

        $Color_3A = PixelGetColor($mPos[0] - 2, $mPos[1])
        $Color_3B = PixelGetColor($mPos[0] - 1, $mPos[1])
        $Color_3C = PixelGetColor($mPos[0], $mPos[1])
        $Color_3D = PixelGetColor($mPos[0] + 1, $mPos[1])
        $Color_3E = PixelGetColor($mPos[0] + 2, $mPos[1])

        $Color_4A = PixelGetColor($mPos[0] - 2, $mPos[1] + 1)
        $Color_4B = PixelGetColor($mPos[0] - 1, $mPos[1] + 1)
        $Color_4C = PixelGetColor($mPos[0], $mPos[1] + 1)
        $Color_4D = PixelGetColor($mPos[0] + 1, $mPos[1] + 1)
        $Color_4E = PixelGetColor($mPos[0] + 2, $mPos[1] + 1)

        $Color_5A = PixelGetColor($mPos[0] - 2, $mPos[1] + 2)
        $Color_5B = PixelGetColor($mPos[0] - 1, $mPos[1] + 2)
        $Color_5C = PixelGetColor($mPos[0], $mPos[1] + 2)
        $Color_5D = PixelGetColor($mPos[0] + 1, $mPos[1] + 2)
        $Color_5E = PixelGetColor($mPos[0] + 2, $mPos[1] + 2)


        GUICtrlSetBkColor($aGridBox[0], $Color_1A)
        GUICtrlSetBkColor($aGridBox[1], $Color_1B)
        GUICtrlSetBkColor($aGridBox[2], $Color_1C)
        GUICtrlSetBkColor($aGridBox[3], $Color_1D)
        GUICtrlSetBkColor($aGridBox[4], $Color_1E)

        GUICtrlSetBkColor($aGridBox[5], $Color_2A)
        GUICtrlSetBkColor($aGridBox[6], $Color_1B)
        GUICtrlSetBkColor($aGridBox[7], $Color_1C)
        GUICtrlSetBkColor($aGridBox[8], $Color_1D)
        GUICtrlSetBkColor($aGridBox[9], $Color_1E)

        GUICtrlSetBkColor($aGridBox[10], $Color_3A)
        GUICtrlSetBkColor($aGridBox[11], $Color_1B)
        GUICtrlSetBkColor($aGridBox[12], $Color_1C)
        GUICtrlSetBkColor($aGridBox[13], $Color_1D)
        GUICtrlSetBkColor($aGridBox[14], $Color_1E)

        GUICtrlSetBkColor($aGridBox[15], $Color_4A)
        GUICtrlSetBkColor($aGridBox[16], $Color_1B)
        GUICtrlSetBkColor($aGridBox[17], $Color_1C)
        GUICtrlSetBkColor($aGridBox[18], $Color_1D)
        GUICtrlSetBkColor($aGridBox[19], $Color_1E)

        GUICtrlSetBkColor($aGridBox[20], $Color_5A)
        GUICtrlSetBkColor($aGridBox[21], $Color_1B)
        GUICtrlSetBkColor($aGridBox[22], $Color_1C)
        GUICtrlSetBkColor($aGridBox[23], $Color_1D)
        GUICtrlSetBkColor($aGridBox[24], $Color_1E)

        If _IsPressed($Keys[0]) Then

            Exit

        EndIf

    WEnd

EndFunc   ;==>Main

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Try this.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <EditConstants.au3>

;Window Width : Window Height : Window X : Window Y
Global $Main_Win_Spec[4] = [120, 170, @DesktopWidth / 2 - 50, @DesktopHeight - 180]

;ESC : Left Bracket : Right Bracket
Global $Keys[3] = ["1B", "DB", "DD"]

;Grid Box
;Global $Grid_Pos[6] = [20, 0, 19, 38, 57, 76]

;Mouse X Position Modifier
Global $mLine[5]

Main()

Func Main()
    Local $aGridBox[10 * 15]
    Local $y = 1
    GUICreate("Image Recognition-", $Main_Win_Spec[0], $Main_Win_Spec[1], $Main_Win_Spec[2], $Main_Win_Spec[3], $WS_DISABLED + $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW + $WS_EX_COMPOSITED)
    GUISetBkColor(0xff5500)
    For $i = 0 To 10 * 15 - 1
        $line = Mod($i, 10) + 1
        $col = Ceiling(($i + 1) / 10)
        ;$aGridBox[$i] = GUICtrlCreateGraphic($Grid_Pos[$line], $Grid_Pos[$col], $Grid_Pos[0], $Grid_Pos[0])
        $aGridBox[$i] = GUICtrlCreateGraphic($line * 10, $col * 10, 10, 10)
        GUICtrlSetBkColor(-1, 0xff0000)
        GUICtrlSetColor(-1, 0)
    Next
    GUISetState()

    While 1
        $mPos = MouseGetPos()
        Sleep(10)

        For $i = 0 To 10 * 15 - 1
            $line = Mod($i, 10) - 5
            $col = Ceiling(($i + 1) / 10) - 8
            GUICtrlSetBkColor($aGridBox[$i], PixelGetColor($mPos[0] + $line, $mPos[1] + $col))
        Next
        If _IsPressed($Keys[0]) Then Exit
    WEnd

EndFunc ;==>Main

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Let's confuse you with lots of versions ;)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Misc.au3>
#include <EditConstants.au3>

Global $Grid_Size = 6
Global $Box_Size = 32

;ESC : Left Bracket : Right Bracket
Global $Keys[3] = ["1B", "DB", "DD"]

;Mouse X Position Modifier
Global $mLine[5]

Main()

Func Main()
    Local $Grid_Box[$Grid_Size][$Grid_Size] ; horz, vert
    Local $Last_Mouse_Pos[2]
    $x = $Grid_Size * ($Box_Size - 1) + 1
    GUICreate("Image Recognition-", $x, $x, @DesktopWidth / 2 - ($x / 2), @DesktopHeight - $x, $WS_DISABLED + $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor(0xff5500)
    For $x = 0 to $Grid_Size - 1
        For $y = 0 to $Grid_Size - 1
            $Grid_Box[$x][$y] = GUICtrlCreateGraphic($x * ($Box_Size - 1), $y * ($Box_Size - 1), $Box_Size, $Box_Size)
            GUICtrlSetBkColor(-1, 0xff0000)
            GUICtrlSetColor(-1, 0)
        Next
    Next
    GUISetState()

    While 1
        $mPos = MouseGetPos()
        If $mpos[0] = $Last_Mouse_Pos[0] And $mpos[1] = $Last_Mouse_Pos[1] Then
            Sleep(10)
        Else
            $Last_Mouse_Pos[0] = $mpos[0]
            $Last_Mouse_Pos[1] = $mpos[1]
            For $x = 0 to $Grid_Size - 1
                For $y = 0 to $Grid_Size - 1
                    GUICtrlSetBkColor($Grid_Box[$x][$y], PixelGetColor($mPos[0] + $x - 2, $mPos[1] + $y - 2))
                Next
            Next
        EndIf
        If _IsPressed($Keys[0]) Then
            Exit
        EndIf
    WEnd
EndFunc
Edited by Spiff59

Share this post


Link to post
Share on other sites

Let's confuse you with lots of versions ;)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Misc.au3>
#include <EditConstants.au3>

Global $Grid_Size = 6
Global $Box_Size = 32

;ESC : Left Bracket : Right Bracket
Global $Keys[3] = ["1B", "DB", "DD"]

;Mouse X Position Modifier
Global $mLine[5]

Main()

Func Main()
    Local $Grid_Box[$Grid_Size][$Grid_Size] ; horz, vert
    Local $Last_Mouse_Pos[2]
    $x = $Grid_Size * ($Box_Size - 1) + 1
    GUICreate("Image Recognition-", $x, $x, @DesktopWidth / 2 - ($x / 2), @DesktopHeight - $x, $WS_DISABLED + $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor(0xff5500)
    For $x = 0 to $Grid_Size - 1
        For $y = 0 to $Grid_Size - 1
            $Grid_Box[$x][$y] = GUICtrlCreateGraphic($x * ($Box_Size - 1), $y * ($Box_Size - 1), $Box_Size, $Box_Size)
            GUICtrlSetBkColor(-1, 0xff0000)
            GUICtrlSetColor(-1, 0)
        Next
    Next
    GUISetState()

    While 1
        $mPos = MouseGetPos()
        If $mpos[0] = $Last_Mouse_Pos[0] And $mpos[1] = $Last_Mouse_Pos[1] Then
            Sleep(10)
        Else
            $Last_Mouse_Pos[0] = $mpos[0]
            $Last_Mouse_Pos[1] = $mpos[1]
            For $x = 0 to $Grid_Size - 1
                For $y = 0 to $Grid_Size - 1
                    GUICtrlSetBkColor($Grid_Box[$x][$y], PixelGetColor($mPos[0] + $x - 2, $mPos[1] + $y - 2))
                Next
            Next
        EndIf
        If _IsPressed($Keys[0]) Then
            Exit
        EndIf
    WEnd
EndFunc

:)

Share this post


Link to post
Share on other sites

Plenty of feedback sorry haven't had much time to work on this but I will take everything you guys gave me and put it to use AsAp ;)

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