Jump to content

if time = 7:00 then exit


Recommended Posts

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 :D

_nowdate should it be?

so

if _nowdate(3) = 7 then

exit

endif

is this correct?

Edited by aphesia
Link to comment
Share on other sites

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 :D

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

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

if _nowdate(3) = 7 then

You mean _nowtime(3)

and read through helpsection on that carefully.

Then try to display results of call with msgbox or consolewrite to better understand. :D

/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

;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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...