Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Fixed Printable Cheatsheet (could use cosmetic improvements, but it…

… works)

- Moved Gosub, MAINWINTOOLBAR to the beginning of manage thread, added Gui,2: Destroy to beginning of manage thread. There may be a better way of doing this, but this is the best way I know of right now to avoid conflicts and keep the window current.  Maybe could unhide the window if it exists instead of destroying it, but it wouldn't be up-to-date with new snippets if new ones were created since the windows was last created.
  • Loading branch information...
commit 9f2aae3a1b758de1b046f1f8be46448781858a86 1 parent 1dc8827
adam authored
Showing with 39 additions and 6 deletions.
  1. +1 −1  TODO.txt
  2. +38 −5 texter.ahk
View
2  TODO.txt
@@ -1,6 +1,6 @@
Features/fixes for 0.6 release:
- Bugs:
- - Fix printable cheatsheet
+ x Fix printable cheatsheet
x Fix right-click preferences bug
- Fix Import keyboard/trigger bug
- Hunt down/fix gina's memory issue/CSV memory issue (suspected same issue?)
View
43 texter.ahk
@@ -14,7 +14,6 @@ StringCaseSense On
AutoTrim,off
SetKeyDelay,-1
SetWinDelay,0
-Gosub,MAINWINTOOLBAR
Gosub,UpdateCheck
Gosub,ASSIGNVARS
Gosub,READINI
@@ -676,6 +675,8 @@ Gui,2: Menu, MgmtMenuBar
return
MANAGE:
+Gui,2: Destroy
+Gosub,MAINWINTOOLBAR
GoSub,GetFileList
Bundles =
Loop,bundles\*,2
@@ -1229,7 +1230,7 @@ return
PrintableList:
alt := 0
-List = <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" href="style.css" rel="stylesheet"><title>Texter Hotstrings and Replacement Text Cheatsheet</title></head><body><h2>Texter Hostrings and Replacement Text Cheatsheet</h2><span class="hotstring" style="border:none`; color:black`;"><h3>Hotstring</h3></span><span class="replacement" style="border:none`;"><h3>Replacement Text</h3></span><span class="trigger" style="border:none`;"><h3>Trigger(s)</h3></span>
+List = <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" href="style.css" rel="stylesheet"><title>Texter Hotstrings and Replacement Text Cheatsheet</title></head><body><h2>Texter Hostrings and Replacement Text Cheatsheet</h2><h2 style="color:red">Default</h2><span class="hotstring" style="border:none`; color:black`;"><h3>Hotstring</h3></span><span class="replacement" style="border:none`;"><h3>Replacement Text</h3></span><span class="trigger" style="border:none`;"><h3>Trigger(s)</h3></span>
Loop, replacements\*.txt
{
alt := 1 - alt
@@ -1237,17 +1238,49 @@ Loop, replacements\*.txt
hs = %A_LoopFileName%
StringReplace, hs, hs, .txt
FileRead, rp, replacements\%hs%.txt
- If hs in %EnterKeys%
+ FileRead, entertrig, bank\enter.csv
+ FileRead, tabtrig, bank\tab.csv
+ FileRead, spacetrig, bank\space.csv
+ If hs in %entertrig%
trig = Enter
- If hs in %TabKeys%
+ If hs in %tabtrig%
trig = %trig% Tab
- If hs in %SpaceKeys%
+ If hs in %spacetrig%
trig = %trig% Space
StringReplace, rp, rp, <,&lt;,All
StringReplace, rp, rp, >,&gt;,All
+ hs := DeHexify(hs)
List = %List%<div class="row%alt%"><span class="hotstring">%hs%</span><span class="replacement">%rp%</span><span class="trigger">%trig%</span></div><br />
}
+Loop,bundles\*,2
+{
+ thisBundle = %A_LoopFileName%
+ List = %List%<br><br><br><h2 style="color:red; clear:both;">%thisBundle%</h2><span class="hotstring" style="border:none`; color:black`;"><h3>Hotstring</h3></span><span class="replacement" style="border:none`;"><h3>Replacement Text</h3></span><span class="trigger" style="border:none`;"><h3>Trigger(s)</h3></span>
+ Loop,bundles\%A_LoopFileName%\replacements\*.txt
+ {
+ trig =
+ hs = %A_LoopFileName%
+ StringReplace, hs, hs, .txt
+ FileRead, rp, bundles\%thisBundle%\replacements\%hs%.txt
+ FileRead, entertrig, bundles\%thisBundle%\bank\enter.csv
+ FileRead, tabtrig, bundles\%thisBundle%\bank\tab.csv
+ FileRead, spacetrig, bundles\%thisBundle%\bank\space.csv
+ If hs in %entertrig%
+ trig = Enter
+ If hs in %tabtrig%
+ trig = %trig% Tab
+ If hs in %spacetrig%
+ trig = %trig% Space
+ StringReplace, rp, rp, <,&lt;,All
+ StringReplace, rp, rp, >,&gt;,All
+ hs := DeHexify(hs)
+ List = %List%<div class="row%alt%"><span class="hotstring">%hs%</span><span class="replacement">%rp%</span><span class="trigger">%trig%</span></div><br />
+ }
+ StringReplace, thisBundle, thisBundle, .txt,,All
+ StringReplace, thisBundle, thisBundle, %A_LoopFileName%,,
+ %A_LoopFileName% = %thisBundle%
+}
List = %List%</body></html>
IfExist resources\Texter Replacement Guide.html
FileDelete,resources\Texter Replacement Guide.html
Please sign in to comment.
Something went wrong with that request. Please try again.