Chris2137378 Posted June 6, 2005 Share Posted June 6, 2005 I wish I were experienced enough to know if I'm asking for the impossible here... I'm trying to create a script that will allow the user to register a program I have written. I'm aware of the idea of using normal e-mail to pass along a registration key but I'm attempting to have it look as professional as possible. I would like to have the registration process be built into the software like many other professional programs and happen online without the use of e-mail. Am I dreaming? or is this possible with AutoIt? or maybe other software? Someone please point me in a direction! Thanks! Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 6, 2005 Share Posted June 6, 2005 You could encrypt a mixture of the user's name and their email address, and create a registration key. Name Provided: John Q. Doe Email Address: myanonymousemail@yahoo.com expandcollapse popup#include<string.au3> Func _CreateNewKey() Dim $prompt = 1, $user, $email, $enstring While $prompt $user = StringLower(InputBox("Test", "Real Name?")) $email = StringLower(InputBox("Test", "Email Address?")) If StringInStr($email, "@") = 0 AND StringLen($user) = 0 Then ContinueLoop Else $enstring = StringUpper(StringLeft(_StringEncrypt(1, $user & $email, $user & "5f4dcc3b5a"), 16)) ClipPut($enstring) MsgBox(0, "test", $enstring) $prompt = 0 EndIf WEnd EndFunc Func _CheckKey() Dim $user, $email, $regkey ;;Prompt for user input Do $user = StringLower(InputBox("Test", "Real Name?")) Until $user <> "" Do $email = StringLower(InputBox("Test", "Email Address?")) Until StringInStr($email, "@") AND StringLen($email) >= 7;'b@x.com' smallest email address possible Do $regkey = StringReplace(StringUpper(InputBox("Test", "Registration Key")), "-", "") Until StringLen($regkey) = 16 ;;Start checking to see if information is valid If $regkey = StringUpper(StringLeft(_StringEncrypt(1, $user & $email, $user & "5f4dcc3b5a"), 16)) Then MsgBox(0, "Test", "Successful!") Else MsgBox(0, "Test", "Invalid Registration Key!") Exit EndIf EndFunc _CreateNewKey() _CheckKey() I think NSIS is still better, but it can be done in AutoIt... If you want to use AutoIt still, look into making a small gui for the inputs... Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Chris2137378 Posted June 6, 2005 Author Share Posted June 6, 2005 I was unaware of NSIS (like I said I'm still green) so I appreciate that bit of info. I looked at their site and plan on tackeling it next. Thanks for the bit of code as well! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now