Author Topic: GGcal to trigger based on day of week and extra logic not to fire.  (Read 3067 times)

0 Members and 1 Guest are viewing this topic.

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
My goal is to use my ggcal to use as a daily alarm clock based on my calendar.   I have used the tablet time example succesfully already but i am trying to figure out the ggcal stuff.
I have a calendar set just for home auto.  I want it to fire off monday through friday based on the calendar entry (morning news). Now where some logic comes in....if another entry that says pto is present, that day will not fire off morning news and let me sleep.   

I have tried searching, but i may not be using the correct phrases.  any direction would be appreciated.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: GGcal to trigger based on day of week and extra logic not to fire.
« Reply #1 on: May 19, 2014, 05:11:39 PM »
Assuming PTO means "paid time off" and is present as a calendar event, then I think you probably want your event-triggered command to do something using

GgCal.GetToday  (provide feed that contains PTO)
Results.MatchConcat  (to get all the event matches from that feed into {LastResult}

and then a logic block:

 if A contains B:   {LastResult}  ,  SomeDistinctStringFromyourPtoEvent
    then : let me Snooze
    else: wake me up

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: GGcal to trigger based on day of week and extra logic not to fire.
« Reply #2 on: May 19, 2014, 06:17:18 PM »
Two additional things:

1. I have just discovered there's a bug with ggcal.GetToday, so I recommend you use ggcal.GetDay instead: http://voxcommando.com/mediawiki/index.php?title=Plugin_GgCal#GetDay

0 = today.

2. If: let me snooze/Else: wake me up should suffice if the only 2 events in your calendar are "pto" and  "morning news".

However, if you plan on having more than those two events in the calendar, you can use 2 If blocks instead:

If: {LastResult} contains pto > VC.StopMacro
If: {1} contains morning news > Wake Up!
« Last Edit: May 19, 2014, 06:27:06 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: GGcal to trigger based on day of week and extra logic not to fire.
« Reply #3 on: May 19, 2014, 06:48:49 PM »
I have tried searching, but i may not be using the correct phrases.  any direction would be appreciated.


The custom Google Search field at the top of the wiki home page searches both the wiki and the forum, so searching for "logic" or whatever from that page may be better than trying to search in the forum directly. http://voxcommando.com/mediawiki/index.php?title=Main_Page

TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: GGcal to trigger based on day of week and extra logic not to fire.
« Reply #4 on: May 19, 2014, 06:51:44 PM »
thanks for the responses. I think i am going to shelve this idea for a bit.  I am going through the alarm clock posts to see what others are doing.  I think i bit off more than i can chew on this idea and will get back to it when i have more experience  :bonk.  thanks

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: GGcal to trigger based on day of week and extra logic not to fire.
« Reply #5 on: May 19, 2014, 07:50:11 PM »
I can't give up that easily.  I went through the alarm clock thread and James mentioned using udpsender,  ( http://voxcommando.com/forum/index.php?topic=653.msg4655#msg4655 ).   

I have a many more questions and it involves ggcal, but if this is the wrong spot and want me to move to the support sub-forum let me know.  Have to go back to work and swap out power supplies on servers, so i might not get back tonight.


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: GGcal to trigger based on day of week and extra logic not to fire.
« Reply #6 on: May 19, 2014, 08:28:03 PM »
I recommend you stick with the ggCal solution.  Take more time if you need it to get familiar with the program.  Let us know if there is anything specific that you need help with.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: GGcal to trigger based on day of week and extra logic not to fire.
« Reply #7 on: May 20, 2014, 09:02:32 AM »
I can't give up that easily.  I went through the alarm clock thread and James mentioned using udpsender,  ( http://voxcommando.com/forum/index.php?topic=653.msg4655#msg4655 ).   

Also, I say this a lot on the forum but it bears repeating. You should be cautious about taking advice from really old threads. VC has developed *a lot* in the past four years.

wiki entry on GgCal: http://voxcommando.com/mediawiki/index.php?title=Plugin_GgCal_Guide
wiki entry on logic blocks: http://voxcommando.com/mediawiki/index.php?title=Logic_Block

If you'd like us to post the xml for our suggested ggGal solution because the pseudo-code we gave wasn't clear enough, let us know. Some folks feel that spoils their fun. :)


TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)