There's a GUI (with abbreviated comments), that, when clicked, pastes in the full comment. It does this via: two matched lists, AltSubmit, and position. In the GUI it shows a keyboard shortcut for each of these comments:
To the right, you can see the typed shortcut, which does the exact same thing as the GUI click... without the need for the GUI.
At first it wasn't a big deal, BUT the more I work on it the more I wonder if I can somehow combine the GUI click choice and the hot string? Right now, they are completely separate... they match, but they are separate. So when one needs to be modified, the other one does too. When a new one needs to be created, it needs to be created twice--once for the gui, once for the hotstring. (If I can't, that's okay. but it would be cool if I could)
Is there a theoretical way to combine the GUI click and the hotstrings?
Applicable abbreviated code:
Most of the GUI:
Code: Select all
Gui, +Resize +hwndgooey
Gui, font, s%ListBoxFontSize%,
Gui, add, tab, w480 h480, Ops Notes | Courses | Shortcuts | Emails |
Gui, Show, x%Xpos% y%Ypos% AutoSize, Scheduling
Gui, tab, 1 ; OPS notes
Gui, Add, Text, , Click your choice* or type the shortcut --> `t`t (shortcut)
Gui, Add, ListBox, w460 r20 AltSubmit T110 vChoice gSubmit_All , % Choices ;
Gui, Add, Text, , *Current Date + Your Initials will be added
Gui, tab, 2 ; Courses
...ETC ETC
The Gosub:
Code: Select all
Submit_All: ;for submitting comments, Tab 1
Gui, Submit, NoHide
output := Comments[Choice]
Gui, Destroy
WinActivate, %prev% ; Opens last active window for pasting
if output != " "; maybe the user didn't select anything?
FormatTime, CurrentDateTime,, M/dd/yyyy
SendInput, % CurrentDateTime output UsrInits ; 'Pastes' Date/Comment/User Initials into original (%prev%) window.
return
Code: Select all
Choices:=("-Completed process. No action until instructed.`t(crpr)
|-Confirmation sent`t`t(conf)
|-Confirming Logistics sent `t`t(clsent)")
Code: Select all
Comments :=["-Completed our current process. No further action until instructed. "
, "-Confirmation email sent. "
, "-Confirming Logistics sent. "]
Code: Select all
; -Confirmation email sent
::conf::
FormatTime, CurrentDateTime,, M/dd/yyyy ; gets current date
SendInput %CurrentDateTime%`-Confirmation email sent. %UsrInits%
return