| View previous topic :: View next topic |
| Author |
Message |
Gspot Guest
|
Posted: Tue Jun 28, 2005 10:27 pm Post subject: Implement a TTL - time to live |
|
|
I need to implement a kind of time to live to my macro, for example after 3 months it will not work any more, or in a specific date,....
Any ideas or code???? (preferably a way that is not easy to overrule)
Thanks
|
|
| Back to top |
|
 |
Guest
|
Posted: Tue Jun 28, 2005 10:40 pm Post subject: |
|
|
| selfdestructioncode? |
|
| Back to top |
|
 |
Belial
Joined: 26 Jun 2005 Posts: 40 Location: Portugal
|
Posted: Wed Jun 29, 2005 12:07 am Post subject: |
|
|
what about a program that checks the date on an internet site, if the specific date > todays date then ExitApp
of course this need an internet connection .. maybe a better way is to put the program counting the days passing .. that way even if you change your date the program stills don't function ^^
This are only some Ideas, and yes, it would be indeed useful =) _________________ Belial |
|
| Back to top |
|
 |
Gspot Guest
|
Posted: Wed Jun 29, 2005 8:39 am Post subject: |
|
|
More ideas ???????????????????? Please
For a selfdestruction code but with expiration date  |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
Posted: Wed Jun 29, 2005 9:03 am Post subject: |
|
|
this is just a calculation with date
don't know where to store(hidden) the new date(30 days later) after the first start
| Code: | B=%A_NOW%
stringmid,TODAY,B,1,8
EnvAdd,ND1,30,days
stringmid,NEWDATE,ND1,1,8
msgbox,Date TODAY=%TODAY%
msgbox,Date in 30 days=%NEWDATE%
if (TODAY>=NEWDATE)
msgbox,over
else
msgbox,not over
|
|
|
| Back to top |
|
 |
4Nothing Guest
|
Posted: Wed Jun 29, 2005 9:15 am Post subject: |
|
|
| Code: | RegRead, Value, RootKey, SubKey, ValueName
If Errorlevel = 1
{
ExpDate = %A_Now%
ExpDate += 30, Days
RegWrite, REG_DWORD, RootKey, SubKey, ValueName, %ExpDate%
}
If Value >= %A_Now%
ExitApp |
|
|
| Back to top |
|
 |
Gspot Guest
|
Posted: Wed Jun 29, 2005 9:28 am Post subject: |
|
|
Thanks for the ideas/code.
A question, the samples code that you give work with the date, if the user change the date, it will overrride the selfdestruction?????
(Sorry but i started to work with Autohotkey 4 days ago) |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
Posted: Wed Jun 29, 2005 9:48 am Post subject: |
|
|
my script is not useful , have no good ideas..., just example for date calculation
if user change date(older<newdate) , you can start your script
ask 4Nothing (for nothing ) |
|
| Back to top |
|
 |
Belial
Joined: 26 Jun 2005 Posts: 40 Location: Portugal
|
Posted: Wed Jun 29, 2005 6:32 pm Post subject: |
|
|
come on .. I gave 2 ideias that actually work and even if the user changes the date the program won't work ^^
you just need 2 code it ..
I don't have much time, but if you have any problems putting it into code I can do it, it isn't so hard =) _________________ Belial |
|
| Back to top |
|
 |
Decarlo110
Joined: 15 Dec 2004 Posts: 303 Location: United States
|
Posted: Wed Jun 29, 2005 9:28 pm Post subject: |
|
|
I can code it, but i need to know... When the countdown is finally reached, what do you want your program to do? _________________ 1) The Open Source Definition http://www.opensource.org/docs/definition_plain.php
2) Intuitive. Logical. Versatile. Adaptable. <<AutoHotkey>> |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jun 30, 2005 4:08 pm Post subject: |
|
|
| Decarlo110 wrote: | | I can code it, but i need to know... When the countdown is finally reached, what do you want your program to do? |
Just exit, i don't wont error messages.
Thank's for the help |
|
| Back to top |
|
 |
4Nothing Guest
|
Posted: Sat Jul 02, 2005 7:47 am Post subject: |
|
|
| Typical behaviour of a virus. Destroy. Hide/selfdestroy. No errormsgs. |
|
| Back to top |
|
 |
Belial
Joined: 26 Jun 2005 Posts: 40 Location: Portugal
|
Posted: Sun Jul 03, 2005 12:29 am Post subject: |
|
|
lol _________________ Belial |
|
| Back to top |
|
 |
Gspot Guest
|
Posted: Mon Jul 04, 2005 1:39 pm Post subject: |
|
|
| 4Nothing wrote: | | Typical behaviour of a virus. Destroy. Hide/selfdestroy. No errormsgs. |
A virus that destroys im self?????????????
It's not a virus. I don't wont to destroy nothing, the idea was more like a trial, after the trial period dosen't work (is this a virus????) |
|
| Back to top |
|
 |
Belial
Joined: 26 Jun 2005 Posts: 40 Location: Portugal
|
Posted: Fri Jul 08, 2005 1:31 am Post subject: |
|
|
If anyone makes a code for this .. please notify me ^^ _________________ Belial |
|
| Back to top |
|
 |
|