Author |
|
seekingdave Newbie
Joined: October 29 2007 Location: United Kingdom
Online Status: Offline Posts: 11
|
Posted: October 29 2007 at 08:40 | IP Logged
|
|
|
Hi all,
Sorry about the dumb question but I know it must be simple to work out when you know what you are doing .
I am trying to have a Macro start at a given time the next day, what I mean is I have set up a button for the morning routine macro in the control center and when pushed I need it to start at 7.30 for the next two days and not the time that I push the button, then next time I press the macro button, two days from that press etc.
Hope this makes some sense to you, looking forward to your help.
Cheers
Dave
|
Back to Top |
|
|
jbbtex Senior Member
Joined: February 15 2007 Location: United States
Online Status: Offline Posts: 181
|
Posted: October 29 2007 at 09:25 | IP Logged
|
|
|
Here's one way.
Create a global variable.
Have the CC button set the value of the global to 2.
Create a timed event to start your macro every day at the time you desire.
Have the first line of the macro check the value of the global.
Code:
JUMP IF("YOUR GLOBAL">0,1,999) |
|
|
If the value is greater than zero, continue the macro, otherwise quit.
Have the last line in the macro set the global to 1 less. After the second day, the global will be zero and the macro will quit after the first line.
|
Back to Top |
|
|
seekingdave Newbie
Joined: October 29 2007 Location: United Kingdom
Online Status: Offline Posts: 11
|
Posted: October 29 2007 at 10:46 | IP Logged
|
|
|
Hi and thanks for the reply,
Sorry to be a real Newbie but could you break this down into CHILD steps for me (PLEASE!!)
Sorry again for this
Cheers
Dave
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: October 29 2007 at 12:19 | IP Logged
|
|
|
Dave,
Welcome to PowerHome!
This should be a fairly simple task with several ways of accomplishing. The way jbbtex outlines should work just fine but it may just be easier with a formula. The way I would do it is to set the Control Center button to execute the following button when pressed:
ph_createtimedevent(0,"YOUR MACRO ID",datetime(relativedate(today(),1),07:30:00)) + ph_createtimedevent(0,"YOUR MACRO ID",datetime(relativedate(today(),2),07:30:00))
That's it. What it does is create two "one-shot" timed events for the next day at 07:30 and the day after that at 07:30. Be sure and substitute the "YOUR MACRO ID" for the ID of the macro that you wish to run.
Hope this helps,
Dave.
|
Back to Top |
|
|
seekingdave Newbie
Joined: October 29 2007 Location: United Kingdom
Online Status: Offline Posts: 11
|
Posted: October 29 2007 at 13:09 | IP Logged
|
|
|
Hi Dave
Thanks so much for the quick reply, and for the amazing software you have done a fantastic job (even a complete idiot like myself can work my way around this ) but it is great to have the forum here for the help, I am sure to ask a LOT of stupid questions so will say sorry now!!.
Another stupid question if you have time, is it possible to test a macro and cancel it half way through.
Thanks again
Dave
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: October 29 2007 at 14:06 | IP Logged
|
|
|
In the macro, just check the "skip" boxes on the lines that you don't want to execute during your testing. Just make sure to clear them when you are done.
|
Back to Top |
|
|
seekingdave Newbie
Joined: October 29 2007 Location: United Kingdom
Online Status: Offline Posts: 11
|
Posted: October 29 2007 at 14:55 | IP Logged
|
|
|
Thanks very much for all the help.
Cheers
Dave
|
Back to Top |
|
|