 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
sleepyy35
Joined: 22 Jul 2004 Posts: 194 Location: cedar city UT
|
Posted: Tue Jun 14, 2005 12:25 pm Post subject: password inputbox help |
|
|
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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Tue Jun 14, 2005 12:29 pm Post subject: |
|
|
Please try this | Code: | If InputPass <> %Password%
{
MsgBox, 16, Access Denied, Invalid Password.
ExitApp
} |
_________________ Ciao
toralf  |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Tue Jun 14, 2005 12:34 pm Post subject: |
|
|
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 |
|
 |
sleepyy35
Joined: 22 Jul 2004 Posts: 194 Location: cedar city UT
|
Posted: Tue Jun 14, 2005 12:37 pm Post subject: |
|
|
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  _________________ ^sleepy^ |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Tue Jun 14, 2005 12:38 pm Post subject: |
|
|
upps, yes, I made a mistake, I'll update the above post. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|