AutoHotkey Community

It is currently May 26th, 2012, 2:58 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: password inputbox help
PostPosted: June 14th, 2005, 1:25 pm 
Offline

Joined: July 22nd, 2004, 6:33 am
Posts: 193
Location: cedar city UT
hi all i cant seem to fig out how to fix this password script of Titans works ok it's just when you enter the wrong password it will load the script
i try'd a few things like return ExitApp no luck
i'm thinking the problom is between access denied and access permitted
any ideas on this
thanks
michael

Code:
If InputPass <> %Password%
   MsgBox, 16, Access Denied, Invalid Password.

   If InputPass = %Password%
   MsgBox, 64, Access Permitted, Welcome user
      Goto, Script_PostValidate
 



Code:
Password = pass

InputBox, InputPass, User Authentication, Enter Password:, HIDE
If ErrorLevel = 1 ;Cancel Pressed
   {
   MsgBox, 48, Cancel, User cancelled`, script will terminate
   ExitApp
   }
else
   {
   If InputPass <> %Password%
   MsgBox, 16, Access Denied, Invalid Password.

   If InputPass = %Password%
   MsgBox, 64, Access Permitted, Welcome user
      Goto, Script_PostValidate
   }
Return

Script_PostValidate:
; ....:: Your Script ::... ;
Return

_________________
^sleepy^


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2005, 1:29 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Please try this
Code:
If InputPass <> %Password%
{
MsgBox, 16, Access Denied, Invalid Password.
ExitApp
}

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2005, 1:34 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
in total it would look like this
Code:
Password = pass
InputBox, InputPass, User Authentication, Enter Password:, HIDE
If ErrorLevel = 1 ;Cancel Pressed
    MsgBox, 48, Cancel, User cancelled`, script will terminate
else If InputPass <> %Password%
    MsgBox, 16, Access Denied, Invalid Password. Script will terminate
Else
    Gosub, Script_PostValidate
Return

Script_PostValidate:
  MsgBox, 64, Access Permitted, Welcome user
; ....:: Your Script ::... ;
Return
*not tested*

_________________
Ciao
toralf
Image


Last edited by toralf on June 14th, 2005, 1:39 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2005, 1:37 pm 
Offline

Joined: July 22nd, 2004, 6:33 am
Posts: 193
Location: cedar city UT
yes that worked good thank you
what was it
ExitApp
}
Else
{
i was trying that and was geting a if error anyways thank you for the help :D

_________________
^sleepy^


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2005, 1:38 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
upps, yes, I made a mistake, I'll update the above post.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: G. Sperotto, Google Feedfetcher, patgenn123 and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group