Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Custom Formulas Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: May 06 2008 at 20:16 | IP Logged Quote BeachBum

Got it … That’s cool.    Thanks.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: May 06 2008 at 21:12 | IP Logged Quote bhlonewolf

Hmmm ... don't think that works, though, Tony. Cool idea, and maybe I'm doing something wrong but I think we may need to wait until the next alpha ;)
Back to Top View bhlonewolf's Profile Search for other posts by bhlonewolf
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 06 2008 at 21:19 | IP Logged Quote dhoward

I can do one better ...

In the GV screen of PowerHome Explorer, just type your formula as the value for the GV.

IS_SUN_UP
if(ph_seconds(now()) < [SUNRISE] AND ph_seconds(now()) < [SUNSET] , 1, 0)

Then in your macro's Jump command, just code

if({IS_SUN_UP} = 1,1,999)

in the sendkeys field.

The way this works is that the sendkeys field for a "Jump" command is a formula. So the first thing that happens for a formula is variable substitution. This would make the formula look like:

if(if(ph_seconds(now()) < [SUNRISE] AND ph_seconds(now()) < [SUNSET] , 1, 0) = 1,1,999)

Next, the system vars for [SUNRISE] and [SUNSET] will be substituted. When no more substitutions exist, the formula will then be evaluated.

I havent actually tested the above so let me know if it doesnt work .

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: May 06 2008 at 21:52 | IP Logged Quote bhlonewolf

Ah! OK -- just tried it and it works. :)
Back to Top View bhlonewolf's Profile Search for other posts by bhlonewolf
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 06 2008 at 23:24 | IP Logged Quote TonyNo

Cool Dave!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: May 06 2008 at 23:31 | IP Logged Quote BeachBum



__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 

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

<< Prev Page of 2
  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