Permalink
Browse files

Enable default bundle on first run, backup pre-hex replacements to re…

…sources\backup dir
  • Loading branch information...
1 parent b2a8900 commit 589c539712a5dfcd10eb797e143f60c1e0364350 adam committed Jul 3, 2007
Showing with 17 additions and 2 deletions.
  1. +14 −2 export.ahk
  2. +3 −0 texter.ahk
View
16 export.ahk
@@ -10,7 +10,18 @@ return
EXPORT:
-GoSub,GetFileList
+Loop,bundles\*,2
+{
+ Bundles = %Bundles%|%A_LoopFileName%
+ thisBundle = %A_LoopFileName%
+ Loop,bundles\%A_LoopFileName%\replacements\*.txt
+ {
+ thisBundle = %thisBundle%%A_LoopFileName%|
+ }
+ StringReplace, thisBundle, thisBundle, .txt,,All
+ StringReplace, thisBundle, thisBundle, %A_LoopFileName%,,
+ %A_LoopFileName% = %thisBundle%
+}
StringReplace, FileList, FileList, .txt,,All
Gui,5: Destroy
Gui,5: font, s12, Arial
@@ -21,7 +32,8 @@ Gui,5: Show, W600 H400, Texter Management
return
ExportOK:
-Gui,Submit
+Gui, 5: Submit
+Gui, 5: Destroy
IfNotExist %A_WorkingDir%\Texter Export
FileCreateDir,%A_WorkingDir%\Texter Export
Loop,Parse,ExportChoice,|
View
3 texter.ahk
@@ -1284,6 +1284,8 @@ return
HexAll:
;MsgBox,Hexing time!
+FileCopyDir,replacements,resources\backup\replacements
+FileCopyDir,bank,resources\backup\bank
Loop, %A_ScriptDir%\replacements\*.txt
{
StringReplace, thisFile, A_LoopFileName, .txt,,All
@@ -1306,6 +1308,7 @@ Loop, %A_ScriptDir%\bank\*.csv
;TODO: Also hexify .csv files
IniWrite,1,texter.ini,Settings,Hexified
+IniWrite,1,texter.ini,Bundles,Default
return
Hexify(x) ;Stolen from Autoclip/Laszlo

0 comments on commit 589c539

Please sign in to comment.