- 909 名前:900 mailto:sage [2009/10/19(月) 18:21:49 ID:J8Rl7QTB0]
- >>883 >>900
簡単な動作チェックしかしていませんが、例えばこんな感じ。 これに加えて、Bluetoothを自動的にONにする仕組みを作れば、 良いんじゃないかな。 ■start.mscr(起動用・ショートカットをスタートアップフォルダへ) ――――――――――――――――――――――――――――――― mainscriptname = "main.mscr" mainscriptpath = SystemPath( "ScriptPath" ) & "\" & mainscriptname ##main.mscrがすでに起動中なら一旦終了させる。 If( ScriptProcExists( mainscriptpath )) KillScript( mainscriptpath ) SleepMessage( 3, mainscriptname & "を再起動しています。" ) EndIf Run( mainscriptpath ) ――――――――――――――――――――――――――――――― ■main.mscr(常駐スクリプト) ――――――――――――――――――――――――――――――― scriptpath1 = SystemPath( "ScriptPath" ) & "\timer1.mscr" Repeat( 0 ) ##timer1.mscrが動いていない事を確認して実行 If( Not ScriptProcExists( scriptpath1 )) ##Notification Queueからtimer1.mscrを削除 RemoveNotifications( scriptpath1 ) ##現時刻から30秒後にtimer1.mscrを実行 ##ActiveSync時に意図せずに実行されて ##しまう場合は、長めに設定してください。 timeA = TimeStamp() + 30 RunAt( timeA, scriptpath1 ) EndIf sleep( 5000 ) EndRepeat ――――――――――――――――――――――――――――――― ■timer1.mscr(スリープモードに入ったら実行させる) ――――――――――――――――――――――――――――――― mainscriptname = "main.mscr" mainscriptpath = SystemPath( "ScriptPath" ) & "\" & mainscriptname ##再起動時に動かないようにmain.mscrの起動をチェック If( ScriptProcExists( mainscriptpath )) ##動作チェック用に音を鳴らす sound1 = "\Windows\CapVideoVoice.wav" PlaySound( sound1 ) ##パケット通信を切断 ##SendSpecial( 126, "down" ) ##SendSpecial( 126, "up" ) ##BluetoothをOFF RunWait( "\Program Files\wifictrl\wifictrl.exe", "off /BT") ##再びスリープモードに移行 PowerOff() EndIf ―――――――――――――――――――――――――――――――
|
|