-
Notifications
You must be signed in to change notification settings - Fork 0
/
TaskDaddyGUI.au3
65 lines (63 loc) · 2.15 KB
/
TaskDaddyGUI.au3
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
#include-once
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
AutoItSetOption("MustDeclareVars", 1)
; Used for file input GUI mode (/f /p)
Global $GuiReturnedSkip, $GuiReturnedCancelAll
Global $frmMain
$GuiReturnedSkip = False
$GuiReturnedCancelAll = False
Func LoadGUI($StrTask = "", $InputFile = "")
If $InputFile = "" Then
$frmMain = GUICreate("Enter task to create - TaskDaddy", 583, 99, 557, 650)
Else
$frmMain = GUICreate("Confirm or modify task to create - TaskDaddy", 583, 99, 557, 650)
EndIf
#Region ### START Koda GUI section ### Form=C:\keep\private\code\au3\TaskDaddy\MainForm.kxf
GUISetIcon("", -1)
GUISetFont(9, 400, 0, "")
Local $Input1 = GUICtrlCreateInput("", 16, 32, 497, 23, $GUI_SS_DEFAULT_INPUT)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
Local $Button1 = GUICtrlCreateButton("", 528, 40, 16, 16, BitOR($BS_DEFPUSHBUTTON, $BS_CENTER, $BS_NOTIFY, $BS_ICON))
GUICtrlSetImage(-1, @SystemDir & "\shell32.dll", -177, 0)
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)
Local $Button2 = GUICtrlCreateButton("", 552, 40, 16, 16, $BS_ICON)
GUICtrlSetImage(-1, @SystemDir & "\shell32.dll", -24, 0)
Local $Label1 = GUICtrlCreateLabel("To create an Outlook task now, type it below and press Enter. Press F1 for help.", 17, 8, 436, 19)
Local $frmMain_AccelTable[1][2] = [["{F1}", $Button2]]
#EndRegion ### END Koda GUI section ###
;TODO: Change form path
Local $Button3, $Button4
If $InputFile <> "" Then
$Button3 = GUICtrlCreateButton("S&kip", 272, 64, 115, 25)
$Button4 = GUICtrlCreateButton("&Cancel all", 400, 64, 115, 25)
EndIf
GUISetAccelerators($frmMain_AccelTable)
GUISetState(@SW_SHOW)
GUICtrlSetData($Input1, $StrTask)
Local $nMsg
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Input1
Case $Button1
$StrTask = GUICtrlRead($Input1)
Return $StrTask
Case $Button2
ShellExecute("hh.exe", @ScriptDir & "\TaskDaddy.chm")
Case $Button3
If $InputFile <> "" Then
$GuiReturnedSkip = True
Return ""
EndIf
Case $Button4
If $InputFile <> "" Then
$GuiReturnedCancelAll = True
Return ""
EndIf
EndSwitch
WEnd
EndFunc ;==>LoadGUI