Chris2137378 0 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! Share this post Link to post Share on other sites
MSLx Fanboy 0 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()) Share this post Link to post Share on other sites
Chris2137378 0 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! Share this post Link to post Share on other sites