aphesia Posted April 6, 2009 Share Posted April 6, 2009 (edited) how can i check which time it is on my pc? i want to exit a script on a specific time (7:00 in the morning). thansk _nowdate should it be? so if _nowdate(3) = 7 then exit endif is this correct? Edited April 6, 2009 by aphesia Link to comment Share on other sites More sharing options...
Manko Posted April 6, 2009 Share Posted April 6, 2009 how can i check which time it is on my pc? i want to exit a script on a specific time (7:00 in the morning).thansk Have you looked through the helpfile, at all? CLUE: ... _date.../Manko Yes i rush things! (I sorta do small bursts inbetween doing nothing.) Things I have rushed and reRushed:* ProDLLer - Process manager - Unload viri modules (dll) and moore...* _WinAPI_ProcessListOWNER_WTS() - Get Processes owner list...* _WinAPI_GetCommandLineFromPID() - Get commandline of target process...* _WinAPI_ThreadsnProcesses() Much info if expanded - optional Indented "Parent/Child"-style Processlist. Moore to come... eventually... Link to comment Share on other sites More sharing options...
aphesia Posted April 6, 2009 Author Share Posted April 6, 2009 ye i just edited cause i found it (didnt found it before) if _nowdate(3) = 7 then exit endif is this correct? Link to comment Share on other sites More sharing options...
TerarinK Posted April 6, 2009 Share Posted April 6, 2009 First off you cannot put time = 7:00 then exit. Check the time today then you need to have a counter time line to check this unless your just string linking them. In that case you need to declare a variable $sTime equals to a string "7:00" If $sTime = "7:00" Then Exit This will only work if you have gotten $sTime to give up a possible 7:00 too 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
Manko Posted April 6, 2009 Share Posted April 6, 2009 if _nowdate(3) = 7 thenYou mean _nowtime(3)and read through helpsection on that carefully.Then try to display results of call with msgbox or consolewrite to better understand. /Manko Yes i rush things! (I sorta do small bursts inbetween doing nothing.) Things I have rushed and reRushed:* ProDLLer - Process manager - Unload viri modules (dll) and moore...* _WinAPI_ProcessListOWNER_WTS() - Get Processes owner list...* _WinAPI_GetCommandLineFromPID() - Get commandline of target process...* _WinAPI_ThreadsnProcesses() Much info if expanded - optional Indented "Parent/Child"-style Processlist. Moore to come... eventually... Link to comment Share on other sites More sharing options...
BlackPhoenix Posted April 6, 2009 Share Posted April 6, 2009 You could use @HOUR to. something like $iTime=7 If @HOUR=$iTime then Exit Link to comment Share on other sites More sharing options...
aphesia Posted April 6, 2009 Author Share Posted April 6, 2009 so this:If $sTime = "7:00" Then Exitor the @HOUR thingy.. the @hour thingy looks better Link to comment Share on other sites More sharing options...
SandelPerieanu Posted April 7, 2009 Share Posted April 7, 2009 ;Time to Exit: 22:57:00 ; Global $exit_hour = 22 Global $exit_min = 57 Global $exit_sec = 00 ; AdlibEnable('Exit_On_Time',1000) ; While 1 Sleep(1) WEnd ; Func Exit_On_Time() If Number(StringFormat("%02d%02d%02d", $exit_hour, $exit_min, $exit_sec)) <= Number(@HOUR & @MIN & @SEC) Then MsgBox(262144, '', 'Done') Exit 0 EndIf EndFunc ;==>Exit_On_Time Link to comment Share on other sites More sharing options...
PhilRip Posted April 7, 2009 Share Posted April 7, 2009 (edited) If @hour=7 then exit (short, simple, works ) oh BlackPhoenix mentioned it already Edited April 7, 2009 by PhilRip Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now