Jump to content
Sign in to follow this  
-=HWD=-

Question Regarding to .ini

Recommended Posts

-=HWD=-

I wanted to make pixelsearch read multiple colours~~ and i created a .ini that looked like this

[Colour]

Desk=8216378 ------what do i add next to read another colour (4476148) ?

how do i make it read another colour? plz help thank you :P

Share this post


Link to post
Share on other sites
SmOke_N

[Colour]

Desk=8216378,4476148,8033934

^^ Notice the colors seperated by commas

Local $IniDeskColour = IniRead('Ini.ini', 'Colour', 'Desk', '')

If $IniDeskColour <> '' Then
    Local $aSplit = StringSplit($IniDeskColour, ',')
    For $iCC = 1 To $aSplit[0]
        If PixelGetColor($x, $y) = $aSplit[$iCC] Then
            MsgBox(64, 'Info:', 'Color Found')
        EndIf
    Next
EndIf
Using StringSplit to seperate them into an array, then a For/Next Loop to search.

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.

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  

×