Jump to content

[Basic help] how to compare two statement at once


Recommended Posts

I have this function where I need program to execute line when its before 4:00PM and after 9:00PM

Func ask4pass()

while $limithour < 16 or > 21

$answer = inputbox ("Time Over", "Please type password or prepare to be shutdown", "", "*", "", "", "", "", 60)

if $bypass = $answer then

Exit

Else

shutdown (5)

EndIf

EndFunc

I get syntax error if I use or statement.... any idea?

EDIT

ok nvm I got it working

Func ask4pass()

while $limithour < 16 or $limithour > 21

$answer = inputbox ("Time Over", "Please type password or prepare to be shutdown", "", "*", "", "", "", "", 60)

if $bypass = $answer then

Exit

Else

shutdown (5)

EndIf

WEnd

EndFunc

Edited by CounterCraft
Link to comment
Share on other sites

I have this function where I need program to execute line when its before 4:00PM and after 9:00PM

I get syntax error if I use or statement.... any idea?

EDIT

ok nvm I got it working

Func ask4pass()

while $limithour < 16 or $limithour > 21

$answer = inputbox ("Time Over", "Please type password or prepare to be shutdown", "", "*", "", "", "", "", 60)

if $bypass = $answer then

Exit

Else

shutdown (5)

EndIf

WEnd

EndFunc

You could use @HOUR....

While @HOUR < 16 Or @HOUR >= 21

;code

WEnd
Instant Lockerz Invite - www.instantlockerzinvite.co.uk
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...