| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed Aug 07, 2002 1:05 am Post subject: question about some old code that i have found.... |
|
|
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 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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Aug 07, 2002 1:29 am Post subject: |
|
|
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  _________________ 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: Wed Aug 07, 2002 2:18 am Post subject: humm |
|
|
| ok so after any lines there shouldn't be a space right? |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Aug 07, 2002 2:29 am Post subject: |
|
|
No space past the numbers (on the same line).
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: Wed Aug 07, 2002 2:57 am Post subject: ahhhhh k |
|
|
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 |
|
 |
LOBO Valued Contributor


Joined: 14 Mar 2002 Posts: 241 Location: Wilmington, Delaware, USA
|
Posted: Wed Aug 07, 2002 3:15 am Post subject: |
|
|
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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Aug 07, 2002 3:25 am Post subject: |
|
|
OK, I was talking about the numbers actually
added to the list...
"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  _________________ 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: Wed Aug 07, 2002 4:15 am Post subject: ok |
|
|
great thanks guys  |
|
| 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
|
|