forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


here "user code" for the thread "question abo

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 26, 2003 5:09 pm    Post subject: here "user code" for the thread "question abo Reply with quote

hello all

here is the "main" part of the code the user end Smile

NOTE: this works BUT i'am sure it could be tweaked better Smile

also it any one tweaks it PLEASE post it here to

thanks to all that helped Smile



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


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Mar 29, 2003 1:29 am    Post subject: Reply with quote

no feedback at all Sad
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sat Mar 29, 2003 1:36 am    Post subject: Reply with quote

Hey Tim, Smile

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

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Mar 29, 2003 2:05 am    Post subject: Reply with quote

ok thanks mac for the heads-up on that Smile
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2146
Location: A House

PostPosted: Sat Mar 29, 2003 7:54 am    Post subject: Reply with quote

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

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Mar 29, 2003 12:07 pm    Post subject: Reply with quote

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

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Mar 29, 2003 5:56 pm    Post subject: Reply with quote

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


yea FF you can move this thread or any one for that mater to a forum you guys think it should go Smile


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
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




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group