| View previous topic :: View next topic |
| Author |
Message |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Fri Feb 21, 2003 5:32 am Post subject: Couple of questions here... keygenerator etc |
|
|
Uhm, just me again.
I want to make a keygenerator program that I also want to embedd into my program.
What I would like to do is to take a users email address and turn it into a serial. I've seen this done in alot of other programs and really like this system.
Could anyone help me with this?
Also, and alittle simpler, how can I check if a file exists?
Let's say I wanna check if filename.txt exists in @path(%0) and pass the result to a variable... Any help guys?
Oh yeah, one more thing. If I create a text object and types in some info in it like this:
Programname
Version
etc etc
email
website
is it possible to add that into one text object, at the same time make the email and website links to open in browser and the email app? _________________
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1567
|
Posted: Fri Feb 21, 2003 6:04 am Post subject: |
|
|
An easy way to make a keygenerator is to take the @asc() ascii value of each character one at a time (in this case an email address) and then output a set of numbers which represent that email address. For instance the output would be something like: 24259283240234 which represent the ascii equivelent of the email address. However this is not very safe and a crack/hacker would figure this out very very quickly. You can perform some mathmatical functions on that output such as multiplying it by 9 or another set of numbers then doing more math on it to modify it's output.
But a more safe and easy way is by using encryption as a way to protect your serials/keys, there are examples here on the forum on how to use a vds made encryption http://www.vdsworld.com/archive/index.php?page=topic&board=3&topic=57 and http://www.vdsworld.com/archive/index.php?page=topic&board=3&topic=107
Or you can take a look at the blowfish extension (high level encryption), and the vdsinout extension (basic encryption).
As for finding if a file exists use the following code:
| Code: |
if @file(c:\whatever.txt)
warn file exists
else
warn file does not exist
end
|
In regards to your last question ahh I think you want to open a browser and an email program at the same time?
| Code: |
shell open,http://www.whatever.com
shell open,"mailto:whatever@doman.com?subject=hello world&body=http://www.whatever.com"
|
|
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Fri Feb 21, 2003 7:29 am Post subject: |
|
|
Thanks alot for your help
I really like the one about the ascii values and doing math on the result
About the file exist, do I have to specify the full path even if the file is in the same dir as the program? _________________
 |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Fri Feb 21, 2003 8:10 am Post subject: |
|
|
Oops, sorry, forgot to respond to the text thing.
No, that's not what I ment.
If I add a dialog right? and then add a text object.
The I write some text in the text object. Is it possible to make some of the text into links? Or to have action function?
Damn, I feel stupid
Here is what I got so far with the ascii conertion thingy
| Code: | %%String = "email@address.com"
%T = @ASC(%%String) |
Now, how to get the darn thing to converting every character?
I'm so tired now.
I was trying to edit a script in VDS and I can't make a new line in the editor.
Guess why...
The program was running in the background.
BTW, what's the difference between these?
%%String = "email@address.com"
%%String = email@address.com _________________
 |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Feb 21, 2003 8:34 am Post subject: |
|
|
| GeoTrail wrote: | Here is what I got so far with the ascii conertion thingy
| Code: | %%String = "email@address.com"
%T = @ASC(%%String) |
Now, how to get the darn thing to converting every character?
|
Try this
| Code: | %%String = "email@address.com"
repeat
%T = @ASC(%%String)
%%out = %%out%T
%%String = @strdel(%%String,1)
until @null(%%String)
info %%out |
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Feb 21, 2003 8:40 am Post subject: |
|
|
| GeoTrail wrote: |
BTW, what's the difference between these?
%%String = "email@address.com"
%%String = email@address.com |
In this case - none. But otherwise you will use quotes to preserve spaces in paths or other strings or to make
sure that some characters are preserved. Try this example
| Code: | INFO This is a test and here is a comma, - the end
INFO "This is a test and here is a comma, - the end" |
If you don't quote the comma here, VDS will just break the string there.
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing
Last edited by Dr. Dread on Fri Feb 21, 2003 8:43 am; edited 1 time in total |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Fri Feb 21, 2003 8:42 am Post subject: |
|
|
Nice one.
Thanks alot Dr. Dread  _________________
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Fri Feb 21, 2003 12:14 pm Post subject: |
|
|
If you want to make shareware, you can look into my VDSReg program. It can create shareware out of VDS scripts and create registration keys as well. Just a thought. See in my sig. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Fri Feb 21, 2003 5:02 pm Post subject: |
|
|
Very nice. I like it.
But I really want to make my own.
It's not to make a big pro app, but mostly as this is my first VDS project, I want to use this project to learn by. Know what I mean? _________________
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Fri Feb 21, 2003 9:27 pm Post subject: |
|
|
Sure no prob. I just thought I would let you know it was there.
Have fun with VDS. It is a great tool  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Fri Feb 21, 2003 9:50 pm Post subject: |
|
|
Yeah, can't disagree with that  _________________
 |
|
| Back to top |
|
 |
|