################################################################## # # trueBox # Black Box Script. # #----------------------------------------------------------------- # ver : 0.1 (2010-11-16) # license : GPL # suggestion : trueonot@yahoo.co.kr / www.trueonot.com ################################################################## ################################################################## # User Configuratin Variable ( Set your device specification) #----------------------------------------------------------------- MovieLocation = "\Storage Card\DCIM\" CameraPath = "\Windows\Camerarunner.exe" CameraWindow = "Ä«¸Þ¶ó" GPSPath = "\Program Files\GpsCycleComputer\GpsCycleComputer.exe" GPSWindow = "GPS Cycle Computer" nInterval = 60*1000 #----------------------------------------------------------------- # User Configuratin Variable ( Set your device specification) ################################################################## ################################################################## # System Configuratin Variable (Not Recommend to change) #----------------------------------------------------------------- ScriptExe = SystemPath("ScriptExe") \ "MortScript.exe" ScriptPath = SystemPath("ScriptPath") \ SystemPath("ScriptName") & SystemPath("ScriptExt") nWidth = ScreenWidth() nHeight = ScreenHeight() bACStatus = ExternalPowered() #----------------------------------------------------------------- # System Configuratin Variable (Not Recommend to change) ################################################################## ################################################################## # Main Thread Start #----------------------------------------------------------------- GPSWindow = @RunGPS(GPSPath) Sleep(1000) CameraWindow = @RunCamera(CameraPath) While(bACStatus = TRUE) Sleep(nInterval) @SaveFile(CameraWindow) bACStatus = ExternalPowered() EndWhile @DeleteOldFile() @CloseCamera(CameraWindow) Sleep(3000) @CloseGPS(GPSWindow) #----------------------------------------------------------------- # Main Thread End ################################################################## ################################################################## # Sub Function. #----------------------------------------------------------------- Sub SaveFile(CameraWindow) Show(CameraWindow) Sleep(500) MouseClick(nWidth/2, nHeight - 100) Sleep(5000) MouseClick(nWidth/2, nHeight - 100) EndSub Sub DeleteOldFile() EndSub Sub CloseGPS(GPSWindow) Show(GPSWindow) #Stop Logging. Sleep(100) MouseClick(nWidth - nWidth/4, nHeight - 50) Sleep(500) Close(GPSWindow) EndSub Sub RunGPS(GPSPath) #Run GPS. GPSWindow = @RunEx(GPSPath) #Set GPS. WaitForActive(GPSWindow, 3000) Sleep(3000) MouseClick(nWidth / 2, nHeight - 50) Return(GPSWindow) EndSub Sub RunCamera(CameraPath) #Run Camera. CameraWindow = @RunEx(CameraPath) #Set Camera. WaitForActive(CameraWindow, 3000) Sleep(2000) MouseClick(nWidth/2, nHeight - 100) Return(CameraWindow) EndSub Sub CloseCamera(CameraWindow) Show(CameraWindow) #Stop Logging. Sleep(500) MouseClick(nWidth/2, nHeight - 50) Sleep(2000) Close(CameraWindow) EndSub #----------------------------------------------------------------- # Sub Function. ################################################################## ################################################################## # Help Function. #----------------------------------------------------------------- Sub RunEx(path) sOldWindow = ActiveWindow() Run(path) while(sOldWindow eq ActiveWindow()) sleep(500) EndWhile Return(ActiveWindow()) EndSub #SleepMessage(1, GPSPath, GPSWindow) #----------------------------------------------------------------- # Help Function. ##################################################################