One of the most common thing that PDA user do is to sync it with thelaptop so that the meeting, contacts, email and some other stuff arealways up to date. However, I feel the process is very irritating, eventhough what i need to do is just to connect the PDA to the laptop usinga USB cable. My laptop has the bluetooth and I always leave it on allthe time (with the wifi). Hence, I wrote a script to perform the syncvia automatically twice a day:
I use the MobSyncto backup and sync the extra folders when there is a connection betweenthe PDA and laptop. So, my script have to know when the MobSync hasfinish the process. In order to let my script to be smart, I use asimple script. The last process of the MobSync is to copy a dummy filefrom laptop to PDA. So, the script will keep looking for the dummyfile. If the dummy file still not copied to PDA, it means that the syncstill in process. If it found the file, means that the sync is finish.So, the script can finish the sync process. The script will also removethe dummy file, so that it wont be confused for the next sync process.Below is the code for the bluetooth sync. You can copy and modify, thensave to a file like bluetoothsync.sksc. Then just use the SKSchema toschedule when to run this file.
#r(#yesno) #p(Sync pc? ) #rmt(5000)
#r(#iffalse) #p(end)
#r(#ifunknown) #p(end)
#r(\windows\repllog.exe) #p(/remote)
#r(#tap) #p(199;308) #sleep(700)
#r(#tap) #p(199;284) #sleep(700)
#r(#0) #sleep(30000)
#r(#delete) #p(\Storage Card\02.JUNK\dummy.txt)
#r(#playwav) #p(\My Documents\h_start.wav)
#r(#eval) #p(b=0)
#r(#findwindow) #p(Bluetooth ActiveSync)
#r(#iffalse) #p(continue)
#r(#activatewindow)
#r(#tap) #p(162;202) #sleep(700)
#r(#goto) #p(done2)
#r(#label) #p(continue)
#r(#yesno) #p(off screen?) #rmt(5000)
#r(#iffalse) #p(syncwait)
#r(#eval) #p(b=1)
#r(#scr)
#r(#label) #p(syncwait)
#r(#chkasconnection)
#r(#iffalse) #p(done)
#r(#ifunknown) #p(done)
#r(#0) #sleep(4000)
#r(#yesno) #p(stop sync? ) #rmr(1) #rmt(3000)
#r(#iftrue) #p(done)
#r(#0) #sleep(4000)
#r(#chkfile) #p(\Storage Card\02.JUNK\dummy.txt)
#r(#iftrue) #p(removefile)
#r(#chkcondition) #p(b==1)
#r(#iffalse) #p(syncwait)
#r(#playwav) #p(\My Documents\attn.wav)
#r(#goto) #p(syncwait) #sleep(2000)
#r(#label) #p(removefile)
#r(#delete) #p(\Storage Card\02.JUNK\dummy.txt)
#r(#label) #p(done)
#r(#scn)
#r(#findwindow) #p(ActiveSync)
#r(#iffalse) #p(btoff)
#r(#activatewindow) #p(ActiveSync)
#r(#tap) #p(199;308) #sleep(700)
#r(#tap) #p(199;284) #sleep(350)
#r(#0) #sleep(4000)
#r(#label) #p(done2)
#r(#findwindow) #p(ActiveSync)
#r(#activatewindow)
#r(#tap) #p(229;14) #sleep(700)
#r(#label) #p(btoff)
#r(#playwav) #p(\My Documents\h_finish.wav)
#r(#btoff) #sleep(1000)
#r(#yesno) #p(suspend? ) #sleep(1000) #rmt(5000)
#r(#iffalse) #p(end)
#r(#ifunknown) #p(end)
#r(\program files\pocketplus\actionsender.exe) #p(-key PLUSACTION{000600000000} Suspend)
#r(#label) #p(end)