# CRON_MAIN.mscr # 스크립트 자체 정보 CRON = SystemPath("ScriptPath") \ SystemPath("ScriptName") & SystemPath("ScriptExt") # 실행할 하위 스크립트들 Base_Dir = SystemPath("ScriptPath") Script_1 = Base_Dir \ "uptime.mscr" Script_2 = Base_Dir \ "sys_info.mscr" Script_3 = Base_Dir \ "Notify.mscr" # AC/Batt 작동주기 설정 (분) AC_Int = 5 Batt_Int = 10 # Notify 작동시각 설정 (동일하면, 항시 실행) Noti_Start = 07 Noti_Stop = 00 # 현재 시각 (00~23) HourNow = FormatTime( "H", TimeStamp() ) # AC/USB 충전 시 If( ExternalPowered() ) k = AC_Int # Battery 사용 시 Else k = Batt_Int EndIf RemoveNotifications( CRON ) RunAt( TimeStamp() + 60 * k, CRON ) # 전화 통화 중 작동 중지 NotInCall = NOT( RegValueExists( "HKLM", "System\State\Phone", "Active Call Count" ) ) If( NotInCall ) CallScript( Script_1 ) CallScript( Script_2 ) # Notify 작동시각 조작 If( Noti_Start = Noti_Stop ) Noti_Start = 00 Noti_Stop = 24 ElseIf( Noti_Start > Noti_Stop ) Noti_Stop = Noti_Stop + 24 If( HourNow < Noti_Start ) HourNow = HourNow + 24 EndIf EndIf # 작동지정시간이면 실행 If( ( HourNow >= Noti_Start ) && ( HourNow < Noti_Stop ) ) CallScript( Script_3 ) EndIf EndIf Exit