Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Gaming • Re: Running multiple progress bars simultaneously

$
0
0
This seemed to work for me:

CODE:

MyGui := Gui()
MyGui.Show
MyGui.BackColor := "EEAA99"
WinSetTransColor("EEAA99", MyGui)
MyGui.Opt("-Caption +AlwaysOnTop")
MyGui.Move(446, 782, 900, 900)

Skill := []
SkillProgress := []

; create progress bars
Loop 10 {
ProgressBar := MyGui.AddProgress("w60 h5 cFFFFFF Background000001 vTempVar", 0)
Skill.Push(ProgressBar)
Skill[A_Index].Name := A_Index
Skill[A_Index].Move(0 + 65 * (A_Index - 1), 5)
SkillProgress.Push(MyGui["" A_Index])
}

SkillUsed(x) {
if SkillProgress[x].Value > 0
return
SetTimer(FillProgressBar, 100)

FillProgressBar() {
SkillProgress[x].Value += 1
if SkillProgress[x].Value >= 100 {
SetTimer(, 0)
SkillProgress[x].Value := 0
}
}
}

; skills
e::SkillUsed(1)
r::SkillUsed(2)

Statistics: Posted by niCode — Today, 06:49



Viewing all articles
Browse latest Browse all 579

Trending Articles