Jump to content

time (hour) script problems


Recommended Posts

hi

i try to make a script that will run something between some hours ( between 22:00 and 8:00 )

i try something like this:

CODE
$ora = @HOUR

if 22< $ora <08 Then

run ("something")

else

MsgBox (1, "ora", "not now")

EndIf

but don`t work

some ideeas?

Link to comment
Share on other sites

Otherwise you can create a loop, but you will have 100% cpu usage! So this is not such great idea...

Sure, if you don't have a Sleep() in a loop the script's CPU-usage will be close to 100%...

Edit : tags..

Edited by Helge
Link to comment
Share on other sites

Well you can get the time from the internet

i know. but how?

i must save a webpage locally, fileopen that file and search the string with hour, grab the time into a variable and so on? o or is a more simple method?

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...