I'm quite 'early' on the road to learning AHK but I'm trying to understand Gui a bit.
I've been playing with a GUI when the background picture is refreshed.
The images are in a folder off of Desktop called “countdown”
This code works when I do a “GuiControl” directly on the image. The Gui.Show pops the Gui with the picture in the background.
When the process gets to three pictures underneath, they replace the original picture one at a time.
Code: Select all
cntd:="countdown"
Gui,Add,Picture,w300 h-1 vMyPicture, %A_Desktop%\%cntd%\image-006.png
Gui,Add,Button,x60 w80 h30, Start
Gui,Show
GuiControl, , MyPicture, %A_Desktop%\%cntd%\image-007.png
sleep 2000
GuiControl, , MyPicture, %A_Desktop%\%cntd%\image-008.png
sleep 2000
GuiControl, , MyPicture, %A_Desktop%\%cntd%\image-009.png
sleep 2000
return
ButtonStart:
MsgBox button
return
When I run it program the Gui.Show will pop the first picture, but subsequent calls to GuiControl will blank the original picture. Puzzling because the address which is passed to GuiControl points to the correct image.
Code: Select all
imaglist:= "image-006.png, image-007.png, image-008.png, image-009.png”
cntd:="countdown"
Gui,Add,Picture,w300 h-1 vMyPicture, %A_Desktop%\%cntd%\image-006.png
Gui,Add,Button,x60 w80 h30, Start
Gui,Show
loop, Parse, imaglist, `,
{
adrr= %A_Desktop%\%dirsub%\%A_LoopField%
;~ MsgBox %adrr%
GuiControl, , MyPicture, %adrr%
sleep 2000
}
return
ButtonStart:
MsgBox button
return
… any thought where I drifted into the weeds?