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
  Variable Action "Find" command or alternate Shaky 3 846 11-02-2021, 08:19 PM
Last Post: Shaky
  SetTimeout and Template gReatAutomation 3 968 03-04-2021, 07:37 PM
Last Post: Dean Roddey
  Template scaling error NishanF 1 1,182 11-10-2020, 03:21 PM
Last Post: NishanF
  Pico Buttons simplextech 10 3,291 01-07-2020, 05:06 PM
Last Post: simplextech
  Template scaling George M 4 2,422 10-28-2019, 02:54 PM
Last Post: George M
  SOLVED: VLC dll Issues with CQC Interface Template Viewer gReatAutomation 3 2,885 06-17-2019, 06:17 AM
Last Post: gReatAutomation
  Sonos - PlayFovorite command NightLight 22 7,699 05-10-2019, 09:32 PM
Last Post: kblagron
  template timeouts and LoadOverlay command Shaky 9 4,261 04-29-2019, 07:46 PM
Last Post: kblagron
  Does the auto-gen template system support Roku? ghurty 3 2,717 12-31-2018, 06:14 PM
Last Post: Dean Roddey
  Pause Command Seems to be Short kblagron 1 1,388 12-01-2018, 09:04 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)