AHK, issues with changing color on script

Ask gaming related questions (AHK v1.1 and older)
LuckyS1337
Posts: 55
Joined: 20 Mar 2023, 12:59

AHK, issues with changing color on script

14 Feb 2024, 10:03

Hello i have problem with my ahk script. I Would like to change my progress color on gui when pixel is found but i have no idea how to do it

Code: Select all

colorvalue = 0x171717

Gui, Add, Progress, c%colorvalue% x0 y0 w1 h540, 110
Gui, Show
return

F1::
{
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 200, 100, 200, 100, 0xFFFFFF, 0, Fast RGB
}
If ErrorLevel = 0
{
ColorValue := "White"
}
If Errorlevel
{
ColorValue := 0x171717
}
Rohwedder
Posts: 7895
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: AHK, issues with changing color on script

14 Feb 2024, 10:43

Hallo,
try:

Code: Select all

colorvalue = 0x171717

Gui, Add, Progress, c%colorvalue% x0 y0 w1 h540 vProg, 110
Gui, Show
return
F1::
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 200, 100, 200, 100, 0xFFFFFF, 0, Fast RGB
If ErrorLevel = 0
	GuiControl, +cWhite, Prog
Else GuiControl, +c%colorvalue%, Prog
Return
LuckyS1337
Posts: 55
Joined: 20 Mar 2023, 12:59

Re: AHK, issues with changing color on script

14 Feb 2024, 15:17

@Rohwedder Thanks a lot! works!

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Rookieahk and 52 guests