I have a macro that, before continuing, checks a series of colors (which unfortunately vary easily over time)
I would like to transfer the list of colors to a file.ini ....... and (but this will be a next step), when it happens that the color is not found, have a popup asking me whether to insert it in the list or not
I show you a piece of the script
Code: Select all
...
WinGetPos, X, Y, , , " wname "
xPixel := X + 415 ;screen coords X for chek
yPixel := Y + 185 ;screen coords Y for chek
Sleep 2000
; IniRead, ColorList, C:\Users\scriptors\Desktop\NOX-AHK\SfondoPacchi.ini, SfondoPacchiStandard, colori
; MsgBoX %ColorList% ; (NOT work)
Loop
{
PixelGetColor, Res, %xPixel%, %yPixel%, RGB ; Note variable are calculated internally so %var%
Sleep 50
; if Res in ColorList
if Res in 0x485662,0x485762,0x495762,0x495763,0x4A5863,0x444F5E,0x45515F,0x475661,0x485661,0x495662,0x4A5864,0x4C5968
{ ; checks if GIFT PACK are finish
break ; Terminate the loop
}
Sleep 100
SetControlDelay -1
ControlClick, x470 y145, " wname ",,,, NA
...
Code: Select all
[SfondoPacchiStandard]
colori=0x485662,0x485762,0x495762,0x495763,0x4A5863,0x444F5E,0x45515F,0x475661,0x485661,0x495662,0x4A5864,0x4C5968