Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

No commit message

  • Loading branch information...
commit 35ea0b3c345a90c5b86a2ec91c207b342757aa36 1 parent a037f11
adam authored
Showing with 153 additions and 6 deletions.
  1. +9 −6 TODO.txt
  2. +51 −0 export.ahk
  3. +57 −0 import.ahk
  4. +36 −0 printable.ahk
View
15 TODO.txt
@@ -1,3 +1,12 @@
+Features/fixes for 0.3 release:
+- Fix blank hotstring bug
+- Import/Export set of replacements.
+- Automatically check for updates
+- Printable formatted list of hotstrings
+- Add autoclose options for brackets, parenthesis, double-quote - turn on and off in preferences
+- Clear input on mouse-clicks; so space, tab, enter, etc. aren't the only shortcuts that clear input and it works more as would be expected - e.g., when you've been typing in another window and then click to a new window, unless your last keystrokes were enter, space, or tab, the input string won't have cleared so it may not work as expected.
+
+
Features/fixes for 0.2 release:
x Add option to run at startup
x Compatibility mode & clipboard mode
@@ -8,15 +17,9 @@ x Turned off AutoTrim so that spaces at the end of replacements are retained
x Double-click systray icon launches management
Someday list:
-- Import/Export set of replacements.
-- Automatically check for updates
- Get a good designer to improve interface and art design (e.g., icon)
-- Printable formatted list of hotstrings
- remove punctuation limitations so users can include puncutation in hotstrings - currently this doesn't work b/c scripts are saved as .txt files, so are limited by Windows naming conventions. AutoClip had a solution for this (hexify), but not sure I want to get rid of my convention - like being able to identify by text file.
-- Add autoclose options for brackets, parenthesis, double-quote - turn on and off in preferences
-- Clear input on mouse-clicks; so space, tab, enter, etc. aren't the only shortcuts that clear input and it works more as would be expected - e.g., when you've been typing in another window and then click to a new window, unless your last keystrokes were enter, space, or tab, the input string won't have cleared so it may not work as expected.
- Add buttons/dropdown/something in Hotkey creation for insertion of clipboard, cursor, dates, time variables
-- Add option for autoclosing
Low priority bugs:
- Check oversized fonts (see http://lifehacker.com/software/texter/lifehacker-code-texter-windows-238306.php#c1047305)
View
51 export.ahk
@@ -0,0 +1,51 @@
+#SingleInstance,Force
+#NoEnv
+SetWorkingDir, "%A_ScriptDir%"
+FileRead, EnterKeys, %A_WorkingDir%\bank\enter.csv
+FileRead, TabKeys, %A_WorkingDir%\bank\tab.csv
+FileRead, SpaceKeys, %A_WorkingDir%\bank\space.csv
+Gosub,Export
+
+return
+
+
+EXPORT:
+GoSub,GetFileList
+StringReplace, FileList, FileList, .txt,,All
+Gui,5: Destroy
+Gui,5: font, s12, Arial
+Gui,5: Add, Text,x15 y20, Hotstring:
+Gui,5: Add, ListBox, 0x8 x13 y40 r15 W100 vExportChoice gShowString Sort,%FileList%
+Gui,5: Add, Button,w80 default GExportOK x420 yp+80,&Export
+Gui,5: Show, W600 H400, Texter Management
+return
+
+ExportOK:
+Gui,Submit
+IfNotExist %A_WorkingDir%\Texter Export
+ FileCreateDir,%A_WorkingDir%\Texter Export
+Loop,Parse,ExportChoice,|
+{
+ FileCopy,%A_WorkingDir%\replacements\%A_LoopField%.txt,%A_WorkingDir%\Texter Export\%A_LoopField%.txt
+ if A_LoopField in %EnterKeys%
+ FileAppend,%A_LoopField%`,,%A_WorkingDir%\Texter Export\enter.csv
+ if A_LoopField in %TabKeys%
+ FileAppend,%A_LoopField%`,,%A_WorkingDir%\Texter Export\tab.csv
+ if A_LoopField in %SpaceKeys%
+ FileAppend,%A_LoopField%`,,%A_WorkingDir%\Texter Export\space.csv
+}
+
+return
+
+GetFileList:
+FileList =
+Loop, %A_WorkingDir%\replacements\*.txt
+{
+ FileList = %FileList%%A_LoopFileName%|
+}
+StringReplace, FileList, FileList, .txt,,All
+return
+
+ShowString:
+
+return
View
57 import.ahk
@@ -0,0 +1,57 @@
+; Mostly complete - just need to do a bit of testing,
+; then set up for actual import/append to .csv files
+
+
+#SingleInstance,Force
+#NoEnv
+SetWorkingDir, "%A_ScriptDir%"
+FileRead, EnterKeys, %A_WorkingDir%\bank\enter.csv
+FileRead, TabKeys, %A_WorkingDir%\bank\tab.csv
+FileRead, SpaceKeys, %A_WorkingDir%\bank\space.csv
+Gosub,Import
+
+return
+
+
+IMPORT:
+FileSelectFolder,ImportFrom,,,Select the Texter import folder
+Gosub,GetFileList
+Loop,%ImportFrom%\*.txt
+{
+ ;StringReplace,A_LoopField,A_LoopField,.txt,,
+ ;rp_import = %rp_import%%A_LoopField%
+ MsgBox,%A_LoopFileFullPath%
+ FileCreateDir,%A_WorkingDir%\Import
+ FileCopy,%A_LoopFileFullPath%,%A_WorkingDir%\Import
+
+}
+FileRead, ImportEnter, %ImportFrom%\enter.csv
+FileRead, ImportTab, %ImportFrom%\tab.csv
+FileRead, ImportSpace, %ImportFrom%\space.csv
+Loop,Parse,ImportEnter,|
+{
+ if A_LoopField not in %EnterKeys%
+ FileAppend,%A_LoopField%`,,%A_WorkingDir%\Import\enter.csv
+}
+Loop,Parse,ImportTab,|
+{
+ if A_LoopField not in %TabKeys%
+ FileAppend,%A_LoopField%`,,%A_WorkingDir%\Import\tab.csv
+
+}
+Loop,Parse,ImportSpace,|
+{
+ if A_LoopField not in %SpaceKeys%
+ FileAppend,%A_LoopField%`,,%A_WorkingDir%\Import\space.csv
+}
+return
+
+
+GetFileList:
+FileList =
+Loop, %A_WorkingDir%\replacements\*.txt
+{
+ FileList = %FileList%%A_LoopFileName%|
+}
+StringReplace, FileList, FileList, .txt,,All
+return
View
36 printable.ahk
@@ -0,0 +1,36 @@
+#SingleInstance,Force
+#NoEnv
+SetWorkingDir, "%A_ScriptDir%"
+FileRead, EnterKeys, %A_WorkingDir%\bank\enter.csv
+FileRead, TabKeys, %A_WorkingDir%\bank\tab.csv
+FileRead, SpaceKeys, %A_WorkingDir%\bank\space.csv
+Gosub,PrintableList
+return
+
+
+
+PrintableList:
+List = <html><head><title>Texter Hotstrings and Replacement Text Cheatsheet</title></head></body><h2>Texter Hostrings and Replacement Text Cheatsheet</h2><table border="1"><th>Hotstring</th><th>Replacement Text</th><th>Trigger(s)</th>
+Loop, %A_WorkingDir%\replacements\*.txt
+{
+ trig =
+ hs = %A_LoopFileName%
+ StringReplace, hs, hs, .txt
+ FileRead, rp, %A_WorkingDir%\replacements\%hs%.txt
+ If hs in %EnterKeys%
+ trig = Enter
+ If hs in %TabKeys%
+ trig = %trig% Tab
+ If hs in %SpaceKeys%
+ trig = %trig% Space
+ StringReplace, rp, rp, <,&lt;,All
+ StringReplace, rp, rp, >,&gt;,All
+ List = %List%<tr><td>%hs%</td><td>%rp%</td><td>%trig%</td></tr>
+
+}
+List = %List%</table></body></html>
+IfExist %A_WorkingDir%\resources\Replacement guide.html
+ FileDelete,%A_WorkingDir%\resources\Texter Replacement Guide.html
+FileAppend,%List%, %A_WorkingDir%\resources\Texter Replacement Guide.html
+Run,%A_WorkingDir%\resources\Texter Replacement Guide.html
+return
Please sign in to comment.
Something went wrong with that request. Please try again.