1 | #include <GUIConstantsEx.au3> |
---|
2 | #include <EditConstants.au3> |
---|
3 | |
---|
4 | Global Const $APP_NAME = "GUICtrlSetData_Bug" |
---|
5 | |
---|
6 | Global $gui_Main |
---|
7 | Global $txt_Path1, $txt_Path2, $txt_Path3, $cmd_Path1, $cmd_Path2, $cmd_Path3 |
---|
8 | Global $Path1 = "C:\Temp\Outbox\AutoIt_GUICtrlSetData\AB123 4567CDExyF08.ini" |
---|
9 | Global $Path2 = "C:\Temp\Outbox\AutoIt_GUICtrlSetData\AB123-4567CDExyF08.ini" |
---|
10 | Global $Path3 = "C:\Temp\Outbox\AutoIt_GUICtrlSetData\AB123_4567CDExyF08.ini" |
---|
11 | |
---|
12 | Opt("MustDeclareVars", 1) |
---|
13 | |
---|
14 | AppMain() |
---|
15 | |
---|
16 | Func AppMain() |
---|
17 | Local $msg = "" |
---|
18 | |
---|
19 | $gui_Main = GUICreate($APP_NAME, 365, 90) |
---|
20 | |
---|
21 | $txt_Path1 = GUICtrlCreateEdit("", 10, 10, 320, 19, $ES_READONLY + $ES_WANTRETURN) |
---|
22 | $txt_Path2 = GUICtrlCreateEdit("", 10, 35, 320, 19, $ES_READONLY + $ES_WANTRETURN) |
---|
23 | $txt_Path3 = GUICtrlCreateEdit("", 10, 60, 320, 19, $ES_READONLY + $ES_WANTRETURN) |
---|
24 | |
---|
25 | $cmd_Path1 = GUICtrlCreateButton("...", 335, 8, 22, 22) |
---|
26 | $cmd_Path2 = GUICtrlCreateButton("...", 335, 33, 22, 22) |
---|
27 | $cmd_Path3 = GUICtrlCreateButton("...", 335, 58, 22, 22) |
---|
28 | |
---|
29 | GUICtrlSetData($txt_Path1, $Path1) |
---|
30 | GUICtrlSetData($txt_Path2, $Path2) |
---|
31 | GUICtrlSetData($txt_Path3, $Path3) |
---|
32 | |
---|
33 | GUISetState(@SW_SHOW, $gui_Main) |
---|
34 | |
---|
35 | While 1 |
---|
36 | $msg = GUIGetMsg() |
---|
37 | If $msg = $GUI_EVENT_CLOSE Then ExitLoop |
---|
38 | If $msg = $cmd_Path1 Then MsgBox(0, $APP_NAME, GUICtrlRead($txt_Path1)) |
---|
39 | If $msg = $cmd_Path2 Then MsgBox(0, $APP_NAME, GUICtrlRead($txt_Path2)) |
---|
40 | If $msg = $cmd_Path3 Then MsgBox(0, $APP_NAME, GUICtrlRead($txt_Path3)) |
---|
41 | WEnd |
---|
42 | |
---|
43 | GUIDelete() |
---|
44 | EndFunc |
---|