Skrip Posted June 29, 2006 Posted June 29, 2006 Please note @hour = 9 PM ;;;Password;;; $bLoop = 1 While $bLoop = 1 $text = InputBox("Password", "Please type in the correct password...", "", "*") If @error = 1 Then Exit Else ; They clicked OK, but did they type the right thing? If $text = "A24" Then $test = 24 * @hour ;Tested at 9 PM;; 24 * 21 If $test = "216" Then MsgBox(0, "Accepted", "Password accepted.") ExitLoop EndIf if NOT $test = "504" Then MsgBox(4096, "Error", "Wrong password try again...") EndIf Else MsgBox(4096, "Error", "Wrong password try again...") EndIf EndIf WEnd ; Print the success message MsgBox(4096, "Password", "Password Accepted") ; Finished! It gets stuck in an infinate loop if you get the password right (A24) To find out the correct numbers do 24 * the hour. (Using 24 hour clock.) [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Nomad Posted June 29, 2006 Posted June 29, 2006 Please note @hour = 9 PM ;;;Password;;; $bLoop = 1 While $bLoop = 1 $text = InputBox("Password", "Please type in the correct password...", "", "*") If @error = 1 Then Exit Else ; They clicked OK, but did they type the right thing? If $text = "A24" Then $test = 24 * @hour ;Tested at 9 PM;; 24 * 21 If $test = "216" Then MsgBox(0, "Accepted", "Password accepted.") ExitLoop EndIf if NOT $test = "504" Then MsgBox(4096, "Error", "Wrong password try again...") EndIf Else MsgBox(4096, "Error", "Wrong password try again...") EndIf EndIf WEnd ; Print the success message MsgBox(4096, "Password", "Password Accepted") ; Finished! It gets stuck in an infinate loop if you get the password right (A24) To find out the correct numbers do 24 * the hour. (Using 24 hour clock.) You do realize that 24 * @Hour (9 p.m.) = 504 and 24 * 9(@Hour = 9 a.m.) = 216, right? Nomad
Skrip Posted June 29, 2006 Author Posted June 29, 2006 (edited) Yes, I do but..How would that really change anything to the script? And it needs to use @hour, becasue I only want the script to be able to open in that hour. Yay, this works now. ;;;Password;;; $bLoop = 1 While $bLoop = 1 $text = InputBox("Password", "Please type in the correct password...", "", "*") If @error = 1 Then Exit Else ; They clicked OK, but did they type the right thing? If $text = "A24" Then $test = 24 * @hour If $test = "528" Then ExitLoop EndIf if NOT $test = "528" Then MsgBox(4096, "Error", "Wrong password try again...") EndIf Else MsgBox(4096, "Error", "Wrong password try again...") EndIf EndIf WEnd ; Print the success message MsgBox(4096, "Password", "Password Accepted") ; Finished! 10 P.M. Edited June 29, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Nomad Posted June 29, 2006 Posted June 29, 2006 Yes, I do but..How would that really change anything to the script? And it needs to use @hour, becasue I only want the script to be able to open in that hour. Yay, this works now. ;;;Password;;; $bLoop = 1 While $bLoop = 1 $text = InputBox("Password", "Please type in the correct password...", "", "*") If @error = 1 Then Exit Else ; They clicked OK, but did they type the right thing? If $text = "A24" Then $test = 24 * @hour If $test = "528" Then ExitLoop EndIf if NOT $test = "528" Then MsgBox(4096, "Error", "Wrong password try again...") EndIf Else MsgBox(4096, "Error", "Wrong password try again...") EndIf EndIf WEnd ; Print the success message MsgBox(4096, "Password", "Password Accepted") ; Finished! 10 P.M. Exactly, you had it set to "216" for saying that the password was correct, but that would be at 9 a.m., not 9 p.m., which would be "504" Now you have it set to "528" which would be correct for 10 p.m.
Skrip Posted June 29, 2006 Author Posted June 29, 2006 Ya, I noticed that... :"> [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
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