View previous topic :: View next topic |
Author |
Message |
tim6389 Professional Member
Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed Mar 26, 2003 5:09 pm Post subject: here "user code" for the thread "question abo |
|
|
hello all
here is the "main" part of the code the user end
NOTE: this works BUT i'am sure it could be tweaked better
also it any one tweaks it PLEASE post it here to
thanks to all that helped
Code: |
title key test
EXTERNAL @WINDIR(S)\vdsinout.dll
%%Pass = Test
%%Name = whatever
INIFILE OPEN,@WINDIR(S)\runone.ini
%%serial = @INIREAD(runone,key)
if %%serial
%%blah = whatever
else
%%key = none
INIFILE OPEN,@WINDIR(S)\runone.ini
INIFILE WRITE,runone,key,none
end
if @EQUAL( %%serial,none)
goto start
else
goto button2button
end
:start
DIALOG CREATE,Test,-1,0,338,160
DIALOG ADD,edit,edit1,36,18,306,24
DIALOG ADD,edit,edit2,84,18,306,24
DIALOG ADD,TEXT,TEXT1,18,18,,,KEY
DIALOG ADD,TEXT,TEXT2,66,18,,,Unlock code
DIALOG ADD,BUTTON,BUTTON1,120,114,108,24,save unlock code
DIALOG SHOW
goto button5button
:evloop
wait event
goto @event()
:button1button
if @dlgtext(Edit2)
%%text = @dlgtext(edit2)
gosub getstring
INIFILE OPEN,@WINDIR(S)\runone.ini
INIFILE WRITE,runone,key,%%out
Info Successfully registered thank-you - Please restart program to complete registration.
stop
end
end
%e = @event()
goto evloop
:GetString
list create,1
list assign,1,%%text
%%out =
if @greater(@count(1),0)
%x = 0
repeat
%i = @item(1,%x)
if %%out
%%out = %%out%i
else
%%out = %i
end
%x = @succ(%x)
until @equal(%x,@count(1))
end
list close,1
exit
:button5button
%%Drive = @VOLINFO(C,Z)
dialog set,edit1,%%Drive
goto evloop
:button2button
%%DriveEnc = @io(ENCSTR,%%Drive,%%Pass)
INIFILE OPEN,@WINDIR(S)\runone.ini
%%serial = @INIREAD(runone,key)
if %%serial
%%blah = whatever
else
%%key = none
INIFILE OPEN,@WINDIR(S)\runone.ini
INIFILE WRITE,runone,key,none
end
%%Drive2 = @VOLINFO(C,Z)
%%Drive2Enc = @io(ENCSTR,%%Drive2,%%Pass)
%%Serial2 = @IO(ENCSTR,%%Name,%%Pass)-@IO(ENCSTR,%%Drive2Enc,%%Pass)
IF @EQUAL(%%Serial,%%Serial2)
info It worked
rem YOUR main program code would go here!!!!!!!!!!
ELSE
rem if key fails it will go back to the start label
goto start
end
:close
exit
|
_________________ Have a nice day |
|
Back to top |
|
|
tim6389 Professional Member
Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Mar 29, 2003 1:29 am Post subject: |
|
|
no feedback at all _________________ Have a nice day |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Mar 29, 2003 1:36 am Post subject: |
|
|
Hey Tim,
Don't take it personal - unless someone needs your program
at the moment, ya often don't get a reply. I've posted a lotta
stuff in the source code forums with no reply at all.
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
tim6389 Professional Member
Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Mar 29, 2003 2:05 am Post subject: |
|
|
ok thanks mac for the heads-up on that _________________ Have a nice day |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Mar 29, 2003 7:54 am Post subject: |
|
|
Sometimes it's just a lack of interest in what you're posting about, and it
can also be that everyone is just busy with other things at the time. It's
not that you stink or something. Not like if you have foot odor and we
can smell it here ya know.
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Mar 29, 2003 12:07 pm Post subject: |
|
|
We should probably place this in the source forums too because it's
easier to find this source code in the source code forums than in the
General Help forum. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
tim6389 Professional Member
Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Mar 29, 2003 5:56 pm Post subject: |
|
|
FreezingFire wrote: | We should probably place this in the source forums too because it's
easier to find this source code in the source code forums than in the
General Help forum. |
yea FF you can move this thread or any one for that mater to a forum you guys think it should go
thanks _________________ Have a nice day |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|