Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Changed +owner2 GUIs to +owner; would throw error with +owner2 if GUI

#2 was not yet created. This way those GUIs don't show up in the taskbar but also don't throw errors.

- Fixed Bundle import/export, now uses line reading loop which is much more efficient than the .ini method I was using before. Bundles should work well now.
  • Loading branch information...
commit 882c8839c0e0014d6adb5bbb4d01485da2d0f533 1 parent 83cca0b
adam authored
View
2  TODO.txt
@@ -7,7 +7,7 @@ Features/fixes for 0.6 release:
(this issue, as far as I can tell, has something to do with the HexAll thread not completing and therefore not writing Hexified=1 to texter.ini. Still not sure what's causing the problem, but a fresh install should fix.)
x Fix CD drive error (need new, innocuous SC key that doesn't conflict with anything) -- Dustin's new trigger method fixes this
- Mouse incompatibility with Outlook?
- - Need to change import/export format - just readline rather than use .ini - .ini too intense, opens and closes file with each read
+ x Need to change import/export format - just readline rather than use .ini - .ini too intense, opens and closes file with each read
x Set focus on Preferences so On-the-fly shortcut doesn't immediately blank out to "None"
- Features:
View
2  includes/GUI/about_GUI.ahk
@@ -1,6 +1,6 @@
ABOUT:
Gui,4: Destroy
-Gui,4: +owner2
+Gui,4: +owner
Gui,4: Add,Picture,x200 y0,%TexterPNG%
Gui,4: font, s36, Courier New
Gui,4: Add, Text,x10 y35,Texter
View
1  includes/GUI/help_GUI.ahk
@@ -1,5 +1,6 @@
HELP:
Gui,5: Destroy
+Gui,5: +owner
Gui,5: Add,Picture,x200 y5,%TexterPNG%
Gui,5: font, s36, Courier New
Gui,5: Add, Text,x20 y40,Texter
View
2  includes/GUI/preferences_GUI.ahk
@@ -1,6 +1,6 @@
PREFERENCES:
Gui,3: Destroy
-Gui,3: +owner2
+Gui,3: +owner
Gui,3: Add, Tab,x5 y5 w306 h280 vTabs,General|Print|Stats ;|Import|Export Add these later
IniRead,otfhotkey,texter.ini,Hotkey,OntheFly
Gui,3: Add,Text,x10 y40,On-the-Fly shortcut:
View
3  includes/functions/autocorrect.ahk
@@ -1,6 +1,7 @@
AUTOCORRECT:
#Hotstring R
-#Hotstring *
+;#Hotstring *
+#Hotstring EndChars -()[]{}:;'"/\,.?!`n `t
::abandonned::abandoned
::abbout::about
::aberation::aberration
View
59 includes/functions/bundles.ahk
@@ -68,7 +68,7 @@ IfMsgBox, Yes
IfNotExist %A_WorkingDir%\Texter Export
FileCreateDir,%A_WorkingDir%\Texter Exports
FileDelete,Texter Exports\%CurrentBundle%.texter
- IniWrite,%CurrentBundle%,Texter Exports\%CurrentBundle%.texter,Info,Name
+ FileAppend,%CurrentBundle%`n,Texter Exports\%CurrentBundle%.texter
if (CurrentBundle = "Default")
BundleDir =
else
@@ -78,8 +78,8 @@ IfMsgBox, Yes
FileRead,replacement,%A_LoopFileFullPath%
IfInString,replacement,`r`n
StringReplace,replacement,replacement,`r`n,`%bundlebreak,All
- IniWrite,%A_LoopFileName%,Texter Exports\%CurrentBundle%.texter,%A_Index%,Hotstring
- IniWrite,%replacement%,Texter Exports\%CurrentBundle%.texter,%A_Index%,Replacement
+ FileAppend,%A_LoopFileName%`n,Texter Exports\%CurrentBundle%.texter
+ FileAppend,%replacement%`n,Texter Exports\%CurrentBundle%.texter
}
MsgBox,4,Your bundle was successfully created!,Congratulations, your bundle was successfully exported!`nYou can now share your bundle with the world by sending them the %CurrentBundle%.texter file.`nThey can add it to Texter through the import feature. `n`nWould you like to see the %CurrentBundle% bundle?
IfMsgBox, Yes
@@ -92,7 +92,9 @@ IMPORT:
FileSelectFile, ImportBundle,,, Import Texter bundle, *.texter
if ErrorLevel = 0
{
- IniRead,BundleName,%ImportBundle%,Info,Name
+ FileReadLine, BundleName, %ImportBundle%, 1
+ InputBox, BundleName, Bundle Name, What would you like to call this bundle?,,,,,,,,%BundleName%
+ BundleDir = bundles\%BundleName%
IfExist bundles\%BundleName%
{
MsgBox,4,%BundleName% bundle already installed,%BundleName% bundle already installed.`nWould you like to overwrite previous %BundleName% bundle?
@@ -103,21 +105,41 @@ if ErrorLevel = 0
FileRemoveDir,bundles\%BundleName%,1
}
}
- FileCreateDir,bundles\%BundleName%
- FileCreateDir,bundles\%BundleName%\replacements
- FileCreateDir,bundles\%BundleName%\bank
-
- Loop
+ if (BundleName = "Default")
{
- IniRead,file,%ImportBundle%,%A_Index%,Hotstring
- IniRead,replacement,%ImportBundle%,%A_Index%,Replacement
- StringReplace, hotstring, file, .txt
- StringReplace,replacement,replacement,`%bundlebreak,`r`n,All
- bundleCollection = %hotstring%,%bundleCollection%
- if file = ERROR
- break
- else
- FileAppend,%replacement%,bundles\%BundleName%\replacements\%file%
+ MsgBox,4,%BundleName% bundle already exitsts,%BundleName% bundle already installed.`nWould you like to overwrite previous %BundleName% bundle?
+ IfMsgBox, No
+ BundleDir=
+ return
+ }
+ if BundleDir <>
+ {
+ FileCreateDir,%BundleDir%
+ FileCreateDir,%BundleDir%\replacements
+ FileCreateDir,%BundleDir%\bank
+ }
+ LineSwitch := 0
+ Loop, Read, %ImportBundle%
+ {
+ if (A_Index = 1)
+ {
+ continue
+ }
+ if (LineSwitch = 0)
+ {
+ LineSwitch := 1 - LineSwitch
+ FileName = %A_LoopReadLine%
+ StringReplace, Hotstring, FileName, .txt
+ bundleCollection = %Hotstring%,%bundleCollection%
+ }
+ else
+ {
+ LineSwitch := 1 - LineSwitch
+ StringReplace,Replacement, A_LoopReadLine,`%bundlebreak,`r`n,All
+ FileAppend, %Replacement%, %BundleDir%\replacements\%FileName%
+ FileName=
+ Replacement=
+ }
}
Gui, 8: Add, Text, Section x10 y10,What triggers would you like to use with the %BundleName% bundle?
Gui,8: Add, Checkbox, vEnterCbox x30, Enter
@@ -154,5 +176,6 @@ Loop,bundles\*,2
Bundles = %Bundles%|
}
GuiControl,2:,BundleTabs,|Default|%Bundles%
+CurrentBundle = %BundleName%
Gosub,ListBundle
return
View
2  texter.ahk
@@ -467,7 +467,7 @@ if disablehotkey <>
#Include includes\functions\InsSpecKeys.ahk ; Insert special characters in Texter script mode by pressing insert and then the special key
#Include includes\functions\MonitorWindows.ahk ; monitors active window and clears input when window switches
-; #Include includes\functions\autocorrect.ahk ; Spelling autocorrect--may implement in 0.6
+ #Include includes\functions\autocorrect.ahk ; Spelling autocorrect--may implement in 0.6
; #Include includes\functions\autoclose.ahk ; Automatically closes bracketed puntuation, like parentheticals - not currently implemented
EXIT:
Please sign in to comment.
Something went wrong with that request. Please try again.