Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hiding Command Buttons on template
#1
Dean,
I want to hide the Christmas SiriusXM command buttons on my template  if month isn't December.  
Any hint on the best and hopefully easiest way to hide these two command button if month (not equal)  "12"?
thanks 
Kevin


[Image: WJXr7rY.jpg]
_______________
Denon 3808ci, 2112ci ,Sonos, NoVo Grand Concerto, Z-Wave(Lights,Locks), Hue, SmartThings,
iPads,Tivo,Hikvision,Elk-M1,TED5000,Somfy RTS blinds+ZRTSI, Amazon Echos+Dots, Polk XRT12,
Honeywell Wi-Fi 9000, Caleo Wi-Fi Thermostats, Rainmachine
Reply
#2
The easiest way would just be, OnPreload, get the date and check the month and mark them hidden if not Dec. Of course it wouldn't go away if you left that screen up on New Years. It would stay until you left that screen and came back. But that's not too big a deal.
Dean Roddey
Explorans limites defectum
Reply
#3
(12-12-2018, 10:07 AM)Dean Roddey Wrote: The easiest way would just be, OnPreload, get the date and check the month and mark them hidden if not Dec. Of course it wouldn't go away if you left that screen up on New Years. It would stay until you left that screen and came back. But that's not too big a deal.

This does not seem to work.(would be nice). Or do I need to use a FormatTimeVal call instead.
System::GetDateParts
    P1=[local]
    P2=LVarBig Grinay
    P3=LVar:Mon
    P4=LVar:Year
_______________
Denon 3808ci, 2112ci ,Sonos, NoVo Grand Concerto, Z-Wave(Lights,Locks), Hue, SmartThings,
iPads,Tivo,Hikvision,Elk-M1,TED5000,Somfy RTS blinds+ZRTSI, Amazon Echos+Dots, Polk XRT12,
Honeywell Wi-Fi 9000, Caleo Wi-Fi Thermostats, Rainmachine
Reply
#4
(12-13-2018, 04:47 AM)kfly Wrote:
(12-12-2018, 10:07 AM)Dean Roddey Wrote: The easiest way would just be, OnPreload, get the date and check the month and mark them hidden if not Dec. Of course it wouldn't go away if you left that screen up on New Years. It would stay until you left that screen and came back. But that's not too big a deal.

This does not seem to work.(would be nice). Or do I need to use a FormatTimeVal call instead.
System::GetDateParts
    P1=[local]
    P2=LVarBig Grinay
    P3=LVar:Mon
    P4=LVar:Year

This seems to work fine(getting current month). Just seemed that GetDateParts would be cleaner. 
thx

System::FormatTimeVal
    P1=[local]
    P2=GVar:Mon
    P3=Pattern
    P4=\%(M)
_______________
Denon 3808ci, 2112ci ,Sonos, NoVo Grand Concerto, Z-Wave(Lights,Locks), Hue, SmartThings,
iPads,Tivo,Hikvision,Elk-M1,TED5000,Somfy RTS blinds+ZRTSI, Amazon Echos+Dots, Polk XRT12,
Honeywell Wi-Fi 9000, Caleo Wi-Fi Thermostats, Rainmachine
Reply
#5
That guy doesn't accept [local], it expects a real time stamp. It could do that, but it currently doesn't. I guess it's mainly assuming you'll be processing time stamps from driver fields because, strangely, there is no way in an action to get the current time stamp. I need to add a command for that as well.
Dean Roddey
Explorans limites defectum
Reply
#6
GetTime/DateParts now will accept [local] as a special case of the time stamp, as of 5.3.921. There is also a System::GetCurTimeStamp command to get the current stamp into a variable. Best to create a variable of time type to put it into, but a string one will work and it'll just get formatted to text.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Template scaling George M 4 136 10-28-2019, 02:54 PM
Last Post: George M
  SOLVED: VLC dll Issues with CQC Interface Template Viewer gReatAutomation 3 459 06-17-2019, 06:17 AM
Last Post: gReatAutomation
  Sonos - PlayFovorite command NightLight 22 1,602 05-10-2019, 09:32 PM
Last Post: kblagron
  template timeouts and LoadOverlay command Shaky 9 1,053 04-29-2019, 07:46 PM
Last Post: kblagron
  Does the auto-gen template system support Roku? ghurty 3 802 12-31-2018, 06:14 PM
Last Post: Dean Roddey
  Pause Command Seems to be Short kblagron 1 526 12-01-2018, 09:04 AM
Last Post: Dean Roddey
  Need some help with DynamicOverLoad command adamalli 14 2,439 08-30-2018, 04:49 PM
Last Post: Dean Roddey
  Nice job on the scaling! 1 template for the 1st time! IVB 0 849 07-15-2018, 04:38 PM
Last Post: IVB
  With Echo integration is it possible to have a set and a query with the same command? ghurty 9 2,276 07-12-2018, 08:43 PM
Last Post: Dean Roddey
  Copied an autogen template for the Elk, but the arm/disarm doesnt work now ghurty 3 1,095 06-03-2018, 05:38 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)