Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 23 2002 at 16:44 | IP Logged
|
|
|
Sure, Dave... Once I either fix the GET WEATHER macro, or, fake it for a screen grab!
Tony
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 23 2002 at 23:17 | IP Logged
|
|
|
Okay! I fixed GET WEATHER and updated the screen grab...
http://members.telocity.com/~tonyno/phqc.gif
Now I want to make it better! It's like cleaning the house again when people are coming over!
Tony
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 30 2002 at 22:29 | IP Logged
|
|
|
Oh, sweetness!
I found a plug-in for my audio player (QCD) that creates a dynamic web page of the currectly playing track and playlist. My QuickControl page now shows what song is playing!
http://members.telocity.com/~tonyno/phqc.gif
All I need now is a way to select tracks from the list and I'm golden! Well, that plus a PDA and router with 802.11...
Tony
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 01 2003 at 01:07 | IP Logged
|
|
|
Is there a way to use sendkeys via a link, not a button, and, preserve nexturl functionality?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 01 2003 at 02:32 | IP Logged
|
|
|
Tony,
Absolutely!! It's a little more tricky because you've got to encode special characters within the sendkeys to conform to http specifications, but it's not bad. A sample would be:
<a href= "/ph-cgi/execsendkeys?nexturl=/yourpage.htm&sendkeys=ph_rtne(ph_macro('YOUR MACRO'))">Click this link</a>
The only tricky part is if your sendkeys includes any "reserved" characters. The above example does not. If your sendkeys includes any reserved characters, then they must be escaped with their %XX counterpart where XX is the hexadecimal representation of the character. Sample reserved characters are: ;/?:@&=+$,
You can read more about URI escaping under RFC2396.
Hope this helps,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 01 2003 at 16:23 | IP Logged
|
|
|
Thanks, Dave! Now my media control buttons are not ugly, and, my graphic floorplan is getting closer!
Tony
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 18 2003 at 18:43 | IP Logged
|
|
|
Link update: My PSP Screenshot...
http://home.earthlink.net/~tonyno/phqc.gif
Tony
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 20 2003 at 23:23 | IP Logged
|
|
|
Yet another update...
http://home.earthlink.net/~tonyno/phqc-frames.gif
I'm moving in a bit of another direction, but, having trouble with frames (I know, I know, don't use frames).
Tony
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 21 2003 at 10:40 | IP Logged
|
|
|
Tony,
I think it looks good. I actually use frames in my own website. I have a frame which displays the webcam image, a frame to control the switching between webcams, and a frame that contains the PowerHome main page.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 21 2003 at 14:03 | IP Logged
|
|
|
Well, then, maybe you can answer this question...
Have you ever had trouble with a frame's target being itself? In my screenshot, the left pane is giving an error when using the gv function you mentioned in the PSP thread. I'm guessing it has to do with the target.
Tony
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 21 2003 at 17:00 | IP Logged
|
|
|
Tony,
I think I found the gv function you're referencing. It's on this same thread on page 1. I don't see the actual code for the gv function though unless Im missing something.
In any event, I don't see where it should cause a problem with frames unless the HTML is specifically coded to act upon a different frame. Each frame is treated independently as if it were its own browser.
If you're interested, post or email me the HTML and I'll take a look at it and see what I can turn up.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 21 2003 at 17:28 | IP Logged
|
|
|
I just found an html frame tag that may fix it (target="_self"). I'll try it tonight.
Tony
PS: Have you started on the PSP "gallery" yet?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 21 2003 at 21:10 | IP Logged
|
|
|
It wasn't the tag; I left out a critical <form> hunk... All is well!
Tony
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 22 2003 at 09:35 | IP Logged
|
|
|
Tony,
Glad to hear it was something simple.
Haven't started the PSP gallery yet, but will be doing it very soon .
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 24 2003 at 20:37 | IP Logged
|
|
|
Dave,
Slightly OT here, but...
Is there a way to make a function with a PSP substitution? I have the same string used many, many times in my Devices frame, and the only change is the X-10 address (like on the main PH web page). As I'm developing this, one change turns into a lot of work!
String:
<% case(ph_getx10stat("A",10) when 0 then "Unknown" when 1 then '<font color="#C0C0C0">Off' when 2 then case(round(ph_getx10level("A",10),0) when 0 then '<font color="#C0C0C0">Dim' when 100 then 'On' else "L:" + string(round(ph_getx10level("A",10),0)))) %>
Thanks!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 24 2003 at 22:08 | IP Logged
|
|
|
Tony,
Well after a bit of thinking, Ive come up with a way to possibly make it a little better.
First Ive created a macro and called if PSP1. Its detailed below:
10 Set System [TEMP1] ph_rtne(ph_setvar_s(1,1,left(ph_getvar_s(2,1),1)) + ph_setvar_s(1,2,mid(ph_getvar_s(2,1),2))) + case(ph_getx10stat(ph_getvar_s(1,1),ph_getvar_n(1,2)) when 0 then "Unknown" when 1 then '<font color="#C0C0C0">Off' when 2 then case(round(ph_getx10level(ph_getvar_s(1,1),ph_getvar_n(1,2)),0) when 0 then '<font color="#C0C0C0">Dim' when 100 then 'On' else "L:" + string(round(ph_getx10level(ph_getvar_s(1,1),ph_getvar_n(1,2)),0))))
Then, from within your PSP, you would replace your code with:
<%ph_rtne(ph_setvar_s(2,1,"A10") + ph_macro("PSP1")) + ph_getvar_s(2,1)%>
It's mostly your code with just a little extra.
This type of thing will be MUCH easier in the next release as their is a new formula function that allows parameter passing and returning a value. In the next release, your PSP code will look like:
<% ph_macrowithparmreturn("PSP1","A",1,0,0,0) %>
Hope this helps,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 25 2003 at 09:38 | IP Logged
|
|
|
Dave,
Great! I'll try that and wait for the next release! It just keeps getting better!
Although, I guess I'm really looking for a way to generate variable-length html.
Tony
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 25 2003 at 11:28 | IP Logged
|
|
|
Something must have gone awry... The macro returns "A10".
Tony
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 25 2003 at 20:47 | IP Logged
|
|
|
Tony,
Yep, I don't know where my brain was...when I called the PSP1 macro, the [TEMP1] variable was passed to it as a separate copy. When the macro was done, that version of the [TEMP1] variable was destroyed so you were left with the PSP formula version unchanged at "A10". I fixed it by using a [GLOBAL1] system variable instead. It's posted below:
10 Set System [GLOBAL1] ph_rtne(ph_setvar_s(1,1,left(ph_getvar_s(3,1),1)) + ph_setvar_s(1,2,mid(ph_getvar_s(3,1),2))) + case(ph_getx10stat(ph_getvar_s(1,1),ph_getvar_n(1,2)) when 0 then "Unknown" when 1 then '<font color="#C0C0C0">Off' when 2 then case(round(ph_getx10level(ph_getvar_s(1,1),ph_getvar_n(1,2)),0) when 0 then '<font color="#C0C0C0">Dim' when 100 then 'On' else "L:" + string(round(ph_getx10level(ph_getvar_s(1,1),ph_getvar_n(1,2)),0))))
The corrected PSP is:
<%ph_rtne(ph_setvar_s(3,1,"K1") + ph_macro("PSP1")) + ph_getvar_s(3,1)%>
I even tested it this time to verify it worked .
Hope this helps,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 25 2003 at 22:33 | IP Logged
|
|
|
Thanks, Dave!
|
Back to Top |
|
|