The Grid 2 users can have phrases - e.g. Star Talker, some users might want to add phrases on their Grid2 based device and also have these phrases available on a smaller handheld device.
MobileTalker is software for PocketPc and WindowsMobile platforms and is a nice, cheap, simple phrase and typing based system.
I have written a script to allow a client to sync phrases from TheGrid2 to their mobile device. Feel free to use it, adapt it etc.
One time only:
Every time you want to sync:
MobileTalker installed
Job done.
If you use a different version of mobile talker to the most current one, you’ll probably have to change the directory referred to in the script on the mobile device.... i.e. in the current version, the directory (on the device) is: Program Files/MobileTalker , on older versions it is different.
The script (included in zip file) is in AutoHotKey and is easy to customise for this...
Progress, SHOW,,Starting Export,Working
FileDelete, Phrases.sql
FileDelete, Categories.sql
FileCount = 0
; SHUT DOWN the Mobile Talker process...
Run, RapiProc -k MobileTalker.exe
Sleep, 1000
Progress, 50,,Creating Messages,Working
;CREATE THE MESSAGE LIST IN Phrases.sql
Loop, *.txt
{
FileCount++
Loop, read, %A_LoopFileName%, Phrases.sql
{
StringLen, length, A_LoopReadLine
IfNotEqual, length, 0
{
StringReplace, CleanedPhrase, A_LoopReadLine, ', '', ReplaceAll
FileAppend, INSERT INTO Phrases `(CategoryID`,Phrase`) Values `(%FileCount%`,`'%CleanedPhrase%`'`)`n
}
}
; CREATE THE CATEGORIES IN Categories.sql
StringTrimRight, CatName, A_LoopFileName, 4
FileAppend, INSERT INTO Categories `(Category`,LanguageID`) Values `(`'%CatName%`'`,44`)`n, Categories.sql
}
; COPY FILES TO DEVICE
Progress, 60,,Copying to device,Working
Run, cecopy /is *.sql "dev:\Program Files\MobileTalker"
Run, RapiMove "My Documents\MobileTalker.sdf" "My Documents\MobileTalker_old.sdf"
; DELETE FILE TO REBUILD PHRASES, RESTART.
Sleep, 1000
Progress, 80,,Finishing Up,Working
Run, RapiMove -d "My Documents\MobileTalker.sdf"
Run, rapistart "\Program Files\MobileTalker\MobileTalker.exe"
Progress, Off
IfEqual, ErrorLevel,0
MsgBox, Messages Exported OK
Else
MsgBox, There was a problem