-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProgressBar.ahk
More file actions
42 lines (36 loc) · 808 Bytes
/
ProgressBar.ahk
File metadata and controls
42 lines (36 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
SetBatchlines, -1
MyWindow := new CBasicWindow("Demo") ;Create an instance of this window class
Loop 1000
{
MyWindow.progBar.Value := A_Index
sleep 10
}
ExitApp
return
#include %A_ScriptDir%\lib
#include CGUI.ahk
Class CBasicWindow Extends CGUI
{
progBar := this.AddControl("Progress", "progBar", "", "Progress")
__New(Title)
{
;Set some window properties
this.Title := Title
this.Resize := true
this.MinSize := "200x50"
this.CloseOnEscape := true
this.DestroyOnClose := true
this.progBar.Min := 0
this.progBar.Max := 1000
this.progBar.Value := 0
this.progBar.Width := 160
;Show the window
this.Show("")
}
PostDestroy()
{
;Exit when all instances of this window are closed
if(!this.Instances.MaxIndex())
ExitApp
}
}