AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

password inputbox help

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
sleepyy35



Joined: 22 Jul 2004
Posts: 194
Location: cedar city UT

PostPosted: Tue Jun 14, 2005 12:25 pm    Post subject: password inputbox help Reply with quote

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^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Tue Jun 14, 2005 12:29 pm    Post subject: Reply with quote

Please try this
Code:
If InputPass <> %Password%
{
MsgBox, 16, Access Denied, Invalid Password.
ExitApp
}

_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Tue Jun 14, 2005 12:34 pm    Post subject: Reply with quote

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


Last edited by toralf on Tue Jun 14, 2005 12:39 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sleepyy35



Joined: 22 Jul 2004
Posts: 194
Location: cedar city UT

PostPosted: Tue Jun 14, 2005 12:37 pm    Post subject: Reply with quote

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 Very Happy
_________________
^sleepy^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Tue Jun 14, 2005 12:38 pm    Post subject: Reply with quote

upps, yes, I made a mistake, I'll update the above post.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group