Тема: AHK: Добавление в цикл нового параметра
Приветсвую всех! В общем, такая ситуация. Есть код, в нем циклично передвигаются определенные предметы, никак не могу додуматься как в цикл добавить еще один параметр, то есть "Квадратик". Точнее чтобы их можно было добавлять неограниченно и они с такой же последовательностью передвигались за крайним.
Gui, Add, Picture, x2 y-1 w510 h60 , load.png
Gui, Add, Button, x222 y69 w100 h30 gAdd, Добавить
Gui, Add, Picture, x451 y8 w41 h41 vPos1,
Gui, Add, Picture, x392 y8 w41 h41 vPos2,
Gui, Add, Picture, x322 y8 w41 h41 vPos3,
Gui, Add, Picture, x248 y8 w41 h41 vPos4,
Gui, Add, Picture, x163 y8 w41 h41 vPos5,
Gui, Add, Picture, x8 y8 w41 h41 vPos6,
Gui, Show, x189 y179 h113 w516, New
New_Index := 1
New_Index2 := 2
Loop 6
{
New_Index ++
New_Index2 ++
GuiControl, , pos%A_Index%, blue.png
GuiControl, , pos%New_Index%, orange.png
GuiControl, , pos%New_Index2%, green.png
Index := A_Index - 1
GuiControl, , pos%Index%,
sleep 1000
}
Return
Add:
return
GuiClose:
ExitApp
Изображения:
https://i.imgur.com/cvRnQ5Y.png - load.png
https://i.imgur.com/dCxsdYC.png - blue.png
https://i.imgur.com/xAKqChC.png - orange.png
https://i.imgur.com/u1sTgUl.png - green.png