西部在线数码世界智能手机软件SKScheMa → [转帖]蓝牙自动同步数据
查看完整版本:[转帖]蓝牙自动同步数据
2008/12/21 3:50:33

这是今天在google时看到一个国外朋友的作品,转过来分享一下。

直接用google的翻译修改一下,省事,有不妥的地方见谅了。

p.s.明白再修改说明吧,今天有点晚了

------------------------

<div id="result_box" dir="ltr">SKSchema脚本:同步掌上电脑与笔记本电脑通过蓝牙

PDA用户最常见的工作,是同步的笔记本电脑上的数据,如会议,联系人,电子邮件和其他一些东西,使它们总是最新的。但是,我觉得这个过程非常刺激,即使我需要做的就是连接的PDA的笔记本电脑使用USB电缆。我的笔记本电脑有蓝牙,我总是让所有的时间(与无线)。因此,我写脚本来执行自动同步通过每天两次:


    1 。在预定的时间,打开PDA的ActiveSync的,并开始通过蓝牙同步。这将发生在我的PDA是在暂停模式。
    2 。关闭屏幕,等到同步完成。
    3 。关闭蓝牙,完全ActiveSync和暂停的PDA 。


我用的是MobSync备份和同步文件夹的额外当出现之间的连接PDA和笔记本电脑。所以,我的脚本必须知道什么时候MobSync已完成这一进程。为了让我的剧本是聪明的,我用一个简单的脚本。最后进程的MobSync是复制一个虚拟文件从笔记本电脑到PDA上。因此,该脚本将继续寻找假档案。如果假文件还没有复制到掌上电脑,这意味着仍然在同步的过程。如果发现该文件,也就是说,是同步完成。因此,脚本可以完成同步的过程。该脚本也将删除该虚拟文件中,这样,它惯于混淆的下一个同步的过程。以下是代码蓝牙同步。您可以复制和修改,然后保存到一个文件一样bluetoothsync.sksc。然后,只需使用SKSchema安排时,运行此文件。</div>----------------------------------

[转自:http://kckoay.blogspot.com/2008/08/skschema-script-sync-pda-with-laptop.html]

Saturday, August 23, 2008

SKSchema Script: Sync PDA with laptop via bluetooth

<div class="post-body entry-content">

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:


  1. At the scheduledtime, turn on the PDA's ActiveSync and start to sync via bluetooth.This will happen when my pda is in suspend mode.
  2. Turn off the screen and wait until the sync finish.
  3. Turn off the bluetooth, quite the ActiveSync and suspend the PDA.

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)

</div><div class="post-footer-line post-footer-line-1"></div>
Powered by BBSXP 2008 MSSQL © 1998-2024
Processed in 0.02 second(s)