Jump to content

Color Array to compare with


Recommended Posts

The Code is to find the table and Non-table.

ALL the test code here,what's wrong with it?

Thank you.

#include <array.au3>

    $xy = MouseGetPos()
    $pixel = PixelGetColor($xy[0],$xy[1])
Global $i=0 
Dim $TableColor[164]=[0,8,16,1024,1032,1040,2056,2064,3088,4112,4120,5153,6168,6177,7201,7209,10240,10248,524288,52429
6,525312,525320,526344,529424,529432,529441,530465,531497,532513,532521,533545,533553,534577,535601,
536633,539714,540994,542026,542034,543050,543058,543066,544082,544090,545114,546138,546147,547171,54
7179,548195,548203,549219,549227,1056809,1057825,1058857,1058865,1058873,1059897,1060913,1060921,106
1945,1061954,1062978,1063993,1064002,1064010,1065282,1065290,1066306,1066314,1066322,1067338,1067346
,1067354,1068362,1068370,1068378,1069394,1069402,1069411,1070426,1070435,1071450,1071459,1071467,107
2483,1072491,1072499,1073507,1073515,1073523,1074539,1074547,1075571,1075579,1076603,1076612,1077627
,1077636,1078651,1078660,1583145,1585201,1586233,1586242,1587266,1587274,1588290,1588298,1589578,159
0602,1590610,1591626,1591634,1591642,1592650,1592658,1592666,1593690,1593699,1594714,1594723,1594731
,1595747,1595755,1596779,1596787,1597803,1597811,1598827,1598835,1598843,1599859,1599867,1600883,160
0891,1600900,1601915,1601924,1601932,1602939,1602948,1602956,1603972,1603980,1604996,2182490,2188659
,2189691,2190715,2190724,2191748,2191756,2192772,2192780,2193796,2193804,2193812,2194828,10241024,10
241032,20563088,41124120]

HotKeySet("`","test")
While 1
    Sleep(100)
WEnd
Func test()
;if IsArray($TableColor) then ToolTip("OK!Next...")
For $element in $TableColor
    if $element=$pixel  Then
        $i=1 
;   ToolTip($pixel&"Nowp----Aarraye"&$element)
    EndIf
Next
if $i=1 then
    MsgBox(0,"","Table here!")  
Else
    MsgBox(0,"","others!")  
    EndIf
EndFunc
Link to comment
Share on other sites

The Code is to find the table and Non-table.

ALL the test code here,what's wrong with it?

Thank you.

what's wrong with the code? It's not commented, so nobody can know what you are doing and nobody can know if there might be an error.

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Thank you.I forgot it.

The code is to compare the Color under MousePos with the Color in the Array $TableColor.

If the the Color under MousePos is the same as any of the color in the array,return true,else return false.

It's a test a program to make a function of Comparing MousePos-color with a Color-List.

Any help will be appritionated!

Edit:

There's no error in running,but it's useless.And I dunno what's wrong with it.

Edited by AU3Newbie
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...