Table of Contents

Syncing Phrases from The Grid 2 to MobileTalker

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.

Syncronising phrases

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.

Files

How to Use

One time only:

  1. Download the attached zip file
  2. Copy this to the phrases file in Grid2 - e.g: C:\Program Files\Sensory Software\The Grid 2\Users\Star Talker\Documents\Chat messages
  3. install and run MobileTalker
  4. click on File→Export Database

Every time you want to sync:

  1. shut down mobile talker on the device
  2. Plug in the mobile device with

MobileTalker installed

  1. Run WriteMessages.exe (double click it)
  2. Re-run mobile Talker.

Job done.

Note - MobileTalker version

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...

Script

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
 
experiencebase/aac/phrasesgrid2tomobiletalker.txt · Last modified: 2008/03/31 by simon
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki