ahk

Plain text code posted
created at 15 Jun 00:07

Edit | Back
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
87
88
; Script: Existing SR Hotkey (Universal)
; AutoHotkey Version: 30-May-2011 FINAL
; Author:         Adam Arseneau <arseneau_adam@emc.com>

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
;SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
setkeydelay, 20
; ---------------------------------
; COM Copy (25-MAR-2011)
; Checks AHK Lib for COM.ahk, copies if not present
; ---------------------------------
IfNotExist, %A_MyDocuments%\AutoHotkey\Lib\COM.ahk ; checks to see if the COM file is missing
  FileCopy, \\corpusfs6\csshare\Hotkeys\Data\COM.ahk, %A_MyDocuments%\AutoHotkey\Lib\
; ---------------------------------  

F33 = \\corpusfs6\csshare\Hotkeys\Data\prod_list.ini                   ; Product List (stored centrally in Hopkinton)
Hotkey_Name = Existing SR Hotkey
ver = v1.0.1

; ---- hotkey.ini file read ------
F20 = %A_MyDocuments%\hotkey.ini                          ; loads hotkey.ini data

IniRead, CST_Team, %F20%, CST_Location, Value                          
IniRead, CST_Name, %F20%, CST_Name, Value
IniRead, CST_Phone, %F20%, CST_Phone, Value
IniRead, CST_Badge, %F20%, CST_Badge, Value
IniRead, CST_StartTime, %F20%, CST_StartTime, Value
IniRead, CST_EndTime, %F20%, CST_EndTime, Value

FormatTime, CST_StartTime, %CST_StartTime%, h:mm tt
FormatTime, CST_EndTime, %CST_EndTime%, h:mm tt

CST_Hours = %CST_StartTime% to %CST_EndTime% EST

OracleSig = %CST_Name%, %CST_Team%, %CST_Phone%`n%CST_Hours%              ; creates OracleSig variable

if CST_Badge = ERROR                                ; if cannot read hotkey.ini, exit!
{
  MsgBox, 16, No Signature File Detected, Please run the Hotkey Signature Generator before continuing.  This hotkey will now exit.
  Runwait, \\corpusfs6\csshare\Hotkeys\Hotkey Signature Generator\Hotkey Signature Generator.ahk    
  ExitApp
}

IniRead, HW_List, %F33%, Hardware, HW_List                        ; Hardware list
if CST_Team = CST Burlington                              ; SW List
  IniRead, SW_List, %F33%, Software, SW_List_1
Else
  IniRead, SW_List, %F33%, Software, SW_List_2  

Time_SR_Start = %A_TickCount%

ifexist, kppp.ico
   Menu, TRAY, Icon, kppp.ico

Gui, Add, Picture, x410 y60, kppp.ico

Gui, Font, S8, MS sans serif
Gui, Add, Text, x16 y20 w50 h20 , SR Type:
Gui, Add, Radio, x116 y20 w70 h20 gSR_Type_Selection vSR_Type, Hardware
Gui, Add, Radio, x186 y20 w70 h20 gSR_Type_Selection, Software
;Gui, Add, Checkbox, x256 y20 w70 h20 vElite_Checked, Elite Call  :-----Elite call notification
Gui, Add, Text, x16 y50 w90 h20 , Product Family:
Gui, Add, DropDownList, x116 y50 w150 h321 vProduct_Selection sort , 
Gui, Add, Text, x16 y80 w90 h20 , SR Number:
Gui, Add, Edit, x116 y80 w100 h20 limit9 vSR, 
Gui, Add, CheckBox, x25 y110 w285 h20 gField_Contact_Selection vUpdate_Type, Check here if field will be contacted to provide update  ;-----Field notification
Gui, Add, GroupBox, x6 y5 w310 h130 , 
Gui, Add, GroupBox, x6 y140 w460 h150 , Action
Gui, Add, Edit, x16 y160 w440 h120 vText,
Gui, Add, GroupBox, x326 y5 w140 h130 , Templates
Gui, Add, Radio, x336 y20 w110 h20 vTemplate gTemplate_Selected Checked, Blank
Gui, Add, Radio, x336 y40 w110 h20 gTemplate_Selected, Callback
Gui, Add, Button, x16 y305 w130 h30 , Healthcheck Report

;TEXT SWAP for tickcount
Gui, Add, Text, x166 y305 w70 h30 vTrans, Attempted Transfers:
Gui, Add, Text, x166 y305 w70 h30 vPage hidden, Attempted Pages:

Gui, Add, Edit, x236 y305 w35 h20 vAT,
Gui, Add, UpDown, x266 y310 w20 h20 , 1
Gui, Add, Button, x366 y305 w100 h30 , Submit
Gui, Show, w477 h362, %Hotkey_Name% %ver% (00:00:00)
GoSub Start
Return

GuiClose:
ExitApp
3.65 KB in 5 ms with coderay