-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIncluded scripts (edit here).ahk
More file actions
62 lines (53 loc) · 1.23 KB
/
Included scripts (edit here).ahk
File metadata and controls
62 lines (53 loc) · 1.23 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;Msgbox % list_files(A_ScriptDir)
tst := list_folder(A_ScriptDir)
i = 30;
length := get_length(tst)
vShipToBillingAddress := ""
loop, %length% {
string = tst[i]
Gui, Add, CheckBox, vShipToBillingAddress, Ship to billing address?
i++
}
Gui, Add, Button, x186 y230 w100 h30 , OK
Gui, Show, w319 h326, Untitled GUI
return
GuiClose:
ExitApp
ButtonOK:
gui, submit, nohide
MsgBox % "A: " tst.a[A] "`nB: " tst.b[B] "`nC: " tst.c[C]
Return
list_files(Directory)
{
files =
Loop %Directory%\*.*
{
files = %files%`n%A_LoopFileName%
}
return files
}
list_folder(Directory) {
array := []
Loop Files, %Directory%\*.*, R ; Recurse into subfolders.
{
if (A_LoopFileExt != "ahk") {
Continue
} else {
array.Push(A_LoopFileName)
;MsgBox, 4, , Filename = %A_LoopFileName%`n`nContinue?
;IfMsgBox, No
;break
}
}
return array
}
get_length(array) {
count :=0
for key, value in array
count++
return count
}