| View previous topic :: View next topic |
| Author |
Message |
Titan
Joined: 11 Aug 2004 Posts: 5376 Location: /b/
|
Posted: Wed Sep 01, 2004 8:56 pm Post subject: Password authentication... |
|
|
Hello,
I don't know if something like this exists but can I make my script password protected so unauthorised users can't use my script? |
|
| Back to top |
|
 |
Candle
Joined: 19 Aug 2004 Posts: 334
|
Posted: Wed Sep 01, 2004 11:34 pm Post subject: |
|
|
Heres a start .
| Code: | InputBox, password, Enter Password, (your input will be hidden), hide
|
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10471
|
Posted: Thu Sep 02, 2004 1:32 am Post subject: |
|
|
That's good. Also, if you want to physically protect the script file itself, you can convert it to an EXE with a password on it. Then put the original .ahk script in a hidden place, or don't distribute it.
Last edited by Chris on Thu Sep 02, 2004 1:42 am; edited 1 time in total |
|
| Back to top |
|
 |
WhiteCloud
Joined: 19 Jun 2004 Posts: 68
|
Posted: Thu Sep 02, 2004 1:34 am Post subject: |
|
|
remember to put suspend on and turn it off when the password is correct else the keys will still work _________________ AHK = Hella fun |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5376 Location: /b/
|
Posted: Thu Sep 02, 2004 4:05 pm Post subject: |
|
|
Ok...
Can I make something like a tickbox option so to not ask for password again (if password was already entered sucesfully once)?
Last edited by Titan on Fri Sep 03, 2004 12:24 am; edited 1 time in total |
|
| Back to top |
|
 |
Candle
Joined: 19 Aug 2004 Posts: 334
|
Posted: Thu Sep 02, 2004 10:30 pm Post subject: |
|
|
| Ya you could save it maybe to a ini file .someplace that would not be seen or something . |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5376 Location: /b/
|
Posted: Fri Sep 03, 2004 12:28 am Post subject: |
|
|
I don't get it...
| Code: | #SingleInstance force
InputBox, pass, Validation, Please type in the password:, , 350, 125
if ErrorLevel <> 0
MsgBox, 16, Error, You cancelled.,
ExitApp
ifInputBox, letmein
Goto, Program
Program:
[program content goes here] |
The password is 'letmein' but the script doesn't work, that's because there is no function to say what password exists ?!? Can somebody help  _________________
 |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Fri Sep 03, 2004 12:35 am Post subject: |
|
|
the variable pass stores what the user types in. so you would need something like-
if pass=letmein
Goto, Program |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5376 Location: /b/
|
Posted: Fri Sep 03, 2004 12:00 pm Post subject: |
|
|
tried that and it still doesn't work :'( _________________
 |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Sep 03, 2004 2:15 pm Post subject: |
|
|
| Code: | #SingleInstance force
InputBox, pass, Validation, Please type in the password:, , 350, 125
if ErrorLevel <> 0
{
MsgBox, 16, Error, You cancelled.
ExitApp
}
if pass=letmein
Goto, Program
Else
{
MsgBox, 16, Error, Wrong password.
ExitApp
}
Program:
[program content goes here] |
|
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5376 Location: /b/
|
Posted: Fri Sep 03, 2004 2:37 pm Post subject: |
|
|
Wkd, that worked like a dream, thanks mate! _________________
 |
|
| Back to top |
|
 |
|