Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Trigger has to fire twice Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 17 2010 at 00:27 | IP Logged Quote krommetje

Hey Guys,

how do I make it that a trigger has to fire twice before operating it's macro?

Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: May 17 2010 at 02:53 | IP Logged Quote grif091

Set a Global variable that has a count of the number of trigger fires. If greater than 1 then allow the macro to run which resets the trigger count. If it is twice within a time period then use time of day in the Global variable rather than a simple count. If the second trigger occurs within the time period run the macro. I would start off always invoking the macro and put the time compare logic in the beginning of the macro. Once you have the logic in the macro working then compress it into something that would fit in the Boolean field of the trigger.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum