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

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



Joined: 11 Aug 2004
Posts: 5376
Location: /b/

PostPosted: Wed Sep 01, 2004 8:56 pm    Post subject: Password authentication... Reply with quote

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
View user's profile Send private message Visit poster's website
Candle



Joined: 19 Aug 2004
Posts: 334

PostPosted: Wed Sep 01, 2004 11:34 pm    Post subject: Reply with quote

Heres a start .
Code:
InputBox, password, Enter Password, (your input will be hidden), hide
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10471

PostPosted: Thu Sep 02, 2004 1:32 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
WhiteCloud



Joined: 19 Jun 2004
Posts: 68

PostPosted: Thu Sep 02, 2004 1:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5376
Location: /b/

PostPosted: Thu Sep 02, 2004 4:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Candle



Joined: 19 Aug 2004
Posts: 334

PostPosted: Thu Sep 02, 2004 10:30 pm    Post subject: Reply with quote

Ya you could save it maybe to a ini file .someplace that would not be seen or something .
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5376
Location: /b/

PostPosted: Fri Sep 03, 2004 12:28 am    Post subject: Reply with quote

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 Exclamation
_________________

Back to top
View user's profile Send private message Visit poster's website
Jon



Joined: 28 Apr 2004
Posts: 373

PostPosted: Fri Sep 03, 2004 12:35 am    Post subject: Reply with quote

the variable pass stores what the user types in. so you would need something like-

if pass=letmein
Goto, Program
Back to top
View user's profile Send private message Send e-mail
Titan



Joined: 11 Aug 2004
Posts: 5376
Location: /b/

PostPosted: Fri Sep 03, 2004 12:00 pm    Post subject: Reply with quote

tried that and it still doesn't work :'(
_________________

Back to top
View user's profile Send private message Visit poster's website
BoBo
Guest





PostPosted: Fri Sep 03, 2004 2:15 pm    Post subject: Reply with quote

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/

PostPosted: Fri Sep 03, 2004 2:37 pm    Post subject: Reply with quote

Wkd, that worked like a dream, thanks mate!
_________________

Back to top
View user's profile Send private message 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