You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: XLSX Text Expander/XLSX Text Expander.ahk
+15-9Lines changed: 15 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,20 +4,23 @@
4
4
SendModeInput ; Recommended for new scripts due to its superior speed and reliability.
5
5
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
6
6
SetTitleMatchMode, 2
7
-
; VERSION 110
8
-
7
+
; VERSION 112
9
8
; This text expander is a work in progress
10
9
10
+
; name of file containing hotstrings
11
+
hotstringFilename := "hotstrings.xlsx"
12
+
; name of worksheet containing the hotstrings
13
+
hotstringWorksheet := "Templates"
14
+
11
15
; initialize the XL variable
12
16
XL :=
13
17
14
18
; fetch the correct file path
15
-
tgtFilePath := A_ScriptDir"\hotstrings.xlsx"
19
+
tgtFilePath := A_ScriptDir"\" hotstringFilename
16
20
17
-
18
-
MsgBox, 1, AutoHotkey Text Expander, This text expander app allows you to automatically convert short phrases into long blocks of text.`n`nFor example, typing <now will automatically expand into the current date and time. All shortcuts used in this app are prefixed with the < symbol.`n`nNew shortcuts can be added in the hotstrings.xlsx file included with this app.
21
+
MsgBox, 1, AutoHotkey Text Expander, This text expander allows you to automatically convert short phrases into long blocks of text. New shortcuts can be added in the included hotstrings.xlsx file.`n`nExample, typing <ate will expand into "AutoHotkey Text Expander"`n`nBuilt In Hotstring:`n<now = DateTime(MM/dd/yyyy hh:mm:ss)
19
22
IfMsgBox, Cancel
20
-
Return
23
+
ExitApp
21
24
IfMsgBox, OK
22
25
try {
23
26
; Check if excel is active
@@ -45,7 +48,10 @@ IfMsgBox, OK
45
48
XL.Visible := 1
46
49
47
50
; select the sheet name containing the templates
48
-
tgtSheet := XL.Worksheets("Templates")
51
+
tgtSheet := XL.Worksheets(hotstringWorksheet)
52
+
53
+
; activate the sheet with hotstrings
54
+
tgtSheet.Activate
49
55
50
56
; Sort the data by column C so it can loop over all of the hotstrings without empty cells
0 commit comments