forked from joedf/LibCon.ahk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExample2.ahk
86 lines (72 loc) · 1.8 KB
/
Example2.ahk
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#SingleInstance,Off
#Include LibCon.ahk ;Needed
#NoTrayIcon ;Suggested
SetBatchLines,-1 ;suggested
LibConDebug:=1 ;let the user know about errors
SmartStartConsole() ;Shows the Console and 'initializes' the library
;<<<<<<<< HEADER END >>>>>>>>>
puts("press a key to create the gui...")
pause(0)
Gui, +HwndhGUI +ToolWindow +E0x40000
Gui, Add, Button, x4 gButton Default, Button
Gui, Add, Button, x+4 yp gButton2, Button2
Gui, Add, Radio, x4 gRadio, Radio
Gui, Add, CheckBox, x+4 yp gCheckbox, CheckBox
Gui, Add, ComboBox, x4 w120 gComboBox, ComboBox
Gui, Add, Edit, x4 w120 gEdit, Edit
Gui, Add, Slider,x4 y+4 w248 gSlider AltSubmit, 25
Gui, Add, Picture,y4 x130 w48 h48 Icon1 gPic1,%A_ahkpath%
Gui, Add, Picture,y4 x184 w48 h48 Icon2 gPic2,%A_ahkpath%
Gui, Add, Picture,y56 x130 w48 h48 Icon3 gPic3,%A_ahkpath%
Gui, Add, Picture,y56 x180 w48 h48 Icon4 gPic4,%A_ahkpath%
Gui, Show,w256, LibCon Test GUI Interaction
WinWaitClose, ahk_id %hGUI%
puts("testing Unicode Input/Output... press a key to continue")
pause(0)
putsf("Current InputCP: %s OutputCP: %s ",GetConsoleInputCP(),GetConsoleOutputCP())
puts("UNICODE_¥£¤__%s__UNICODE_¢µ®___")
print("enter some Unicode chars:")
gets(a)
puts(a)
pause()
puts("bye!")
Sleep 500
ExitApp
Button:
puts("Button was pressed")
return
Button2:
puts("Button2 was pressed")
return
Radio:
puts("Radio was clicked")
return
CheckBox:
puts("CheckBox was clicked")
return
ComboBox:
puts("ComboBox was clicked/changed")
return
Edit:
puts("Edit was changed")
return
Slider:
puts("Slider was clicked/Moved")
return
Pic1:
puts("Picture 1 was clicked")
return
Pic2:
puts("Picture 2 was clicked")
return
Pic3:
puts("Picture 3 was clicked")
return
Pic4:
puts("Picture 4 was clicked")
return
GuiClose:
Gui,Destroy
puts("Gui was Closed")
return