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 


question about some old code that i have found....

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Aug 07, 2002 1:05 am    Post subject: question about some old code that i have found.... Reply with quote

hello all

I have been playing with any old code that i can find...in which case on old msg board baord ...i forgot who made it...BUT my question is why is it when i set the pc data passed the 14 day trial it still works? i do see that if you set it back it don't work Smile is there a error in the code? if not please explain to me why it works pass the 14 days. ( when setiing the pc date head)

thanks



Code:
%%Trial = 10
  if @NOT(@REGREAD(LOCAL,Software\YourCompany\YourProduct,FirstRan))
    list CREATE, 1
    list LOADTEXT, 1,
"0
"31
"28
"31
"30
"31
"30
"31
"31
"30
"31
"30
"31
    %%month = @datetime(m)
    %%numberofdays = @item(1,%%month)
    list close,1
    registry WRITE,LOCAL,Software\YourCompany\YourProduct,FirstRan,@datetime(dd|mm|yyy)
    parse "%a;%b;%c",@datetime(dd|mm|yyy)
    registry WRITE,LOCAL,Software\YourCompany\YourProduct,LastRan,@sum(@sum(%a,@prod(%b,%%NumberOfDays)),@prod(%c,365))
    registry WRITE,LOCAL,Software\YourCompany\YourProduct,MonthRan,%%NumberOfDays
  else
    parse "%a;%b;%c",@datetime(dd|mm|yyy)
    parse "%d;%e;%f",@REGREAD(LOCAL,Software\YourCompany\YourProduct,FirstRan)
    rem - Number of days in the month
    %%num = @regread(LOCAL,Software\YourCompany\YourProduct,MonthRan)
    %%one = @sum(@sum(@SUM(%a,@prod(%b,%%num)),@prod(%c,365)))
    %%two = @sum(@sum(@sum(%d,@prod(%e,%%num)),@prod(%f,365)))
    %%last = @REGREAD(LOCAL,Software\YourCompany\YourProduct,LastRan)
    if @not(@equal(%%one,%%LAST))
      if @not(@greater(%%one,%%LAST))
        warn You set your clock back! Please change to correct date.
        exit
      end
    end
    if @greater(@DIFF(%%ONE,%%TWO),%%Trial)
      warn %%Trial days trial period expired!
      exit
    else
      registry WRITE,LOCAL,Software\YourCompany\YourProduct,LastRan,@sum(@sum(%a,@prod(%b,%%num)),@prod(%c,365))
    end
  end
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: Wed Aug 07, 2002 1:29 am    Post subject: Reply with quote

One thing to check:

When a posted program uses LIST LOADTEXT, there's
gonna be extra control chars at the end of each line
when you copy and paste it. Go thru the code and
remove anything past the numbers loaded into list 1
(even seemingly blank spaces).

I only skimmed thru the code (looks more complicated
than necessary to me), but you may find that it won't
work past today with your clock set ahead...

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: Wed Aug 07, 2002 2:18 am    Post subject: humm Reply with quote

ok so after any lines there shouldn't be a space right?
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: Wed Aug 07, 2002 2:29 am    Post subject: Reply with quote

No space past the numbers (on the same line). 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: Wed Aug 07, 2002 2:57 am    Post subject: ahhhhh k Reply with quote

ok other question should there be , after the numbers then?


Code:
list CREATE,1,
    list LOADTEXT,1,


or like this:

Code:
list CREATE,1
    list LOADTEXT,1


thanks
Back to top
View user's profile Send private message
LOBO
Valued Contributor
Valued Contributor


Joined: 14 Mar 2002
Posts: 241
Location: Wilmington, Delaware, USA

PostPosted: Wed Aug 07, 2002 3:15 am    Post subject: Reply with quote

tim6389

You don't need the commas after the number unless you are adding another parameter to it

example
Code:
 list create,1,sorted
list loadtext,1


-Mark
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Mac
Professional Member
Professional Member


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

PostPosted: Wed Aug 07, 2002 3:25 am    Post subject: Reply with quote

OK, I was talking about the numbers actually
added to the list... Confused

"0
"31
"28
"31
"30
"31
"30
"31
"31
"30
"31
"30
"31

Make sure there's no trailing spaces (or anything else)
after each number...

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: Wed Aug 07, 2002 4:15 am    Post subject: ok Reply with quote

great thanks guys 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 -> General Help 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