Jump to content

Setting A Password


Recommended Posts

okay...i'm just a beginner having fun with the scripting language. how do you set passwords...here is my script. i thought i set it right, but i guess what i did only applies to msgboxes...can somebody help.

AutoItSetOption ("TrayIconHide", 1)
Break(1)
WinWaitActive("Johnny's Stuff")
WinActive("Johnny's Stuff")
WinKill("Johnny's Stuff")
;--------------------------------------------------------------------------
$answer = MsgBox(52, "Grant access?", "Do you have the password?")
;--------------------------------------------------------------------------
  If $answer = 6 Then
;--------------------------------------------------------------------------
$pass = InputBox("Verifying rights...", "Please enter password.", "", "*")
  If $pass = surenovida Then
     Run("Johnny's Stuff", "C:\~~~", @SW_MAXIMIZE)
     Exit 
  Else
     MsgBox(17, "Incorrect!!!", "Game over loser!!!", 10)
     WinWaitClose("Incorrect!!!", "Game over loser!!!")
     Shutdown(12)
  EndIf
;--------------------------------------------------------------------------
  Else $answer = 7 Then
     MsgBox(49, "Sorry...", "Access Denied!!!", 10)
;--------------------------------------------------------------------------
  EndIf
Edited by payaso
Link to comment
Share on other sites

AutoItSetOption ("TrayIconHide", 1)
Break(1)
WinWaitActive("Johnny's Stuff")
WinActive("Johnny's Stuff")
WinKill("Johnny's Stuff")
;--------------------------------------------------------------------------
$answer = MsgBox(52, "Grant access?", "Do you have the password?")
;--------------------------------------------------------------------------
If $answer = 6 Then
  ;--------------------------------------------------------------------------
   $pass = InputBox("Verifying rights...", "Please enter password.", "", "*")
   If $pass = "surenovida" Then
      Run("Johnny's Stuff", "C:\~~~", @SW_MAXIMIZE)
      Exit
   Else
      MsgBox(17, "Incorrect!!!", "Game over loser!!!", 10)
      WinWaitClose("Incorrect!!!", "Game over loser!!!")
      Shutdown(12)
   EndIf
  ;--------------------------------------------------------------------------
ElseIf $answer = 7 Then
   MsgBox(49, "Sorry...", "Access Denied!!!", 10)
  ;--------------------------------------------------------------------------
EndIf

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