AutoHotkey Community

It is currently May 26th, 2012, 4:15 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: June 28th, 2005, 11:27 pm 
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
:D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2005, 11:40 pm 
selfdestructioncode?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 1:07 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 9:39 am 
More ideas ???????????????????? Please
For a selfdestruction code but with expiration date :D :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 10:03 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 10:15 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 10:28 am 
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)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 10:48 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
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 :D)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 7:32 pm 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2005, 10:28 pm 
Offline

Joined: December 15th, 2004, 10:24 pm
Posts: 303
Location: United States
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>>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2005, 5:08 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2005, 8:47 am 
Typical behaviour of a virus. Destroy. Hide/selfdestroy. No errormsgs.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2005, 1:29 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
lol

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 4th, 2005, 2:39 pm 
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????)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 8th, 2005, 2:31 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
If anyone makes a code for this .. please notify me ^^

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Cerberus, poserpro, Yahoo [Bot] and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group