HyperNext Studio
HyperNext Studio => General => Topic started by: AnonymousPostings on July 01, 2010, 07:41:05 AM
-
hey I need help programming my software, its one of the hypernext projects called email,
I'm just a beginner at programming, and I need to know how to program the register box so that the software has lets say 30 days to use and after that they have to register to continue using the software and I don't know how to program the register box, could you help me on this? if you can, thanks
please reply back to me on how to do this, you a big help
-
Perhaps the easiest yet still difficult to crack way to is to put the following code into the Variables section of the MainCode.
Global startTime
Global endTime
if startTime=0 then
@ Get start time
Put DateNowFN into startTime
@ Make end time - 30 days
Put 3600 into endTime
Multiply endTime by 24
Multiply endTime by 30
Add startTime to endTime
EndIf
and also use the QuitSave(1) command to exit your program - this ensures that all variables are saved.
To check if the program has expired, use this code somewhere as your program starts up - perhaps in the card's open handler. In the User Reg example it could go in the card's open handler to display the expired message.
Global endTime
Local time
Put DateNowFN into time
if time>endTime then
Message 'Expired'
QuitSave(1)
endif
You could use a text file stored somewhere but hackers could find it.