Author Topic: Questions about GgCal plugin  (Read 4069 times)

0 Members and 2 Guests are viewing this topic.

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
Questions about GgCal plugin
« on: January 04, 2016, 12:07:15 AM »
Thought I'd post this here rather than start a new topic?

I'm going through the excellent you tube Google Calendar Plug In but VC history is not giving me an GCaleventalert in the history.

If I click Get Event or GGCal set timer via the ggcal plugin I get the information in a dialogue box ala the tutorial, but the event does not show up in the VC history window???
I'm running VC 2.2.1.2 & GCal plugin V3.

Anyway I have copied the above code & whilst modifying it I'm trying to understand what each bit does.

{PF 1} Why is this used in the show OSD as all it does is show up as {PF.1} & when I delete it the command works fine without?
{Match 1} Am I right this will read out whatever has been

Lastly is there a way to say, "what's on my calendar on Friday", I imagine this would be done using the payload.xml but not sure what value I give to a day? Or is this as mentioned elsewhere a case of getting into the python plugin?

Oh & lastly lastly, is there a way to create a new line for the OSD rather than have all information showing on one. Checked the wiki OSD section & searched the forum but couldn't find.

So the below code is what I have done & it's working fine.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="139" name="What's on my Google Calendar {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Each event for that day is returns as a match: {Match.1}, {Match.1} etc. Currently will use your default calendar feed.">
  <action>
    <cmdType>GgCal.GetDay</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{Match.{i}}</param>
      <param>4000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>{Match.{i}}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType />
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>What's on my Calendar, Do I have any appointments</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="True">payloads\Google days.xml</payloadFromXML>
</command>
« Last Edit: January 04, 2016, 02:27:31 AM by SteveB69 »
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Questions about GgCal plugin
« Reply #1 on: January 04, 2016, 04:20:15 AM »
Again,  the Wiki give you the "most" answers.


...Whenever you query your Google Calendar data from VoxCommando, individual calendar items will be returned as matches (e.g. {Match.1}, {Match.2}, etc.).
In the "Custom Formatting" tab, you can customize the format of those matches...

http://voxcommando.com/mediawiki/index.php?title=Plugin_GgCal_Guide

and for {PF.1} = friendly payloads

http://voxcommando.com/mediawiki/index.php?title=Payloads#Example_of_friendly_payloads

nime5ter use the friendly payload in her command and has it also explained:

Quote
The payload.xml file, "Google days" is required to associate friendly terms with an index value that Google requires when you ask for a specific day. Today is 0, tomorrow is 1, etc.
Quote
You will need to also download the attached payload XML file, which I use in 2 of the commands.


New line variable {CR} in OSD: Ok, it was not so easy to find in the Wiki  ;)  ,but here it is: http://voxcommando.com/mediawiki/index.php?title=Logical_Command_Builder#System_Variables


here is a example OSD with 3 generated lines:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<command id="34" name="3 lines OSD" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>test{CR}test2{CR}test3</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>
« Last Edit: January 04, 2016, 04:54:11 AM by Kalle »
***********  get excited and make things  **********

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
Re: Questions about GgCal plugin
« Reply #2 on: January 04, 2016, 04:32:27 AM »
Thanks Kalle, honest I do use the wiki but it can all be a tad overwhelming  ::confused
Your links by the way came out weird, but still clickable???

Am feeling chuffed though as tonight I created a windows snap left or right using a payload range rather than 2 separate commands.  8) 8)
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Questions about GgCal plugin
« Reply #3 on: January 04, 2016, 04:43:57 AM »
I know, sometimes it is a hard learning curve to get things to work and we will get also fast results or more achievements. I'm sometimes also lost on the Wiki, because it has so much information, but if you use the search function in the right corner with "keywords", you will find relative fast for what you looking for.


Yes I noticed the crazy formating text - it looks like my chrome browser has a problem with the Forum-Website.
***********  get excited and make things  **********

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Questions about GgCal plugin
« Reply #4 on: January 04, 2016, 08:27:16 AM »

New line variable {CR} in OSD: Ok, it was not so easy to find in the Wiki  ;)  ,but here it is: http://voxcommando.com/mediawiki/index.php?title=Logical_Command_Builder#System_Variables

:-)

Actually, all the standard variables are listed on the "variables" page of the wiki.

http://voxcommando.com/mediawiki/index.php?title=Variables

And for new users, we have a special stickied topic on the forum introducing the topic of variables on the tutorials board, called:
NEW USERS: Variables in VoxCommando --> cool things in {curly brackets}.

That page introduces the concept, and links to the variables page of the wiki.

However, depending on the situation, we often use OSD.AddText, rather than {CR} -- for example, when returning a list of matches.
« Last Edit: January 04, 2016, 08:45:48 AM 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: Questions about GgCal plugin
« Reply #5 on: January 04, 2016, 09:11:51 AM »
If I click Get Event or GGCal set timer via the ggcal plugin I get the information in a dialogue box ala the tutorial, but the event does not show up in the VC history window???
I'm running VC 2.2.1.2 & GCal plugin V3.

Hm. Sounds like you might want to watch the video again. In it, James says that the event will not appear in the history window until the actual time that the event is scheduled to occur. He then demonstrates that.

With regard to the Ggcal version you're using, the latest version is GgCal 2.0.0.4


Going forward, knowing the true version number for various plugins will likely help avoid misunderstandings.

The plugin uses v3 of Google's API. I think James added the label "v3" to the settings window for long-time users, to alert them to the fact that the plugin was now using v3 of Google's API. I can see how that would be confusing!

However, VC plugin version numbers can always be found in the plugins tab within the Options or, for active plugins, the Plugins window that can be enabled in the main UI window.

Quote
Anyway I have copied the above code & whilst modifying it I'm trying to understand what each bit does.

{PF 1} Why is this used in the show OSD as all it does is show up as {PF.1} & when I delete it the command works fine without?

{PF.1} is only relevant if your command using a PayloadXML file in which phrases are associated with "unfriendly" values.
As Kalle mentions, in my command, I have associated friendly days of the week with the numbers that Google requires.

The GgCal.GetDay action requires {1}, because it needs a number, not a day of the week. It is only the OSD and TTS that would require {PF.1}. Since you didn't try to use {1} in your OSD etc., it is not a problem for you when you issue the command.

Quote
Lastly is there a way to say, "what's on my calendar on Friday", I imagine this would be done using the payload.xml but not sure what value I give to a day? Or is this as mentioned elsewhere a case of getting into the python plugin?

Yes, this requires an advanced solution that involves the Python plugin. I suggest holding off on this until you're more comfortable with the program.

Quote
So the below code is what I have done & it's working fine.

It may seem as though it's working fine if you only have one event in your calendar. However, your OSD will only show you the first event if you have more than one event on that day.

Below is how one would adjust your command so that it will return multiple events, if more than one event is scheduled for that day.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<command id="139" name="What's on my Google Calendar {1} (revised)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Each event for that day is returns as a match: {Match.1}, {Match.2} etc. Currently will use your default calendar feed.">
  <action>
    <cmdType>GgCal.GetDay</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>Agenda:</param>
      <param>4000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.AddText</cmdType>
    <params>
      <param>{Match.{i}}</param>
    </params>
    <cmdRepeat>{#M}</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>{Match.{i}}</param>
    </params>
    <cmdRepeat>{#M}</cmdRepeat>
  </action>
  <phrase>What's on my Calendar, Do I have any appointments</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="True">payloads\Google days.xml</payloadFromXML>
</command>
« Last Edit: January 04, 2016, 10:25:57 AM 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)

nikeb

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 0
  • i got this.
    • View Profile
Re: Questions about GgCal plugin
« Reply #6 on: June 03, 2016, 05:50:34 AM »
i'm sorry to bring up the question again, I just didn't want to open another ggCal topic.

I'm having some issue on events that are on multiple days (example: Vacations)
I'm using the ggCal.SetTimers but the thing is that i don't have the date/end time parameter (maybe it was in the v2 one).
So i can trigger only the beginning of that.

In the description i read those parameters:
http://voxcommando.com/mediawiki/index.php?title=Plugin_GgCal

"Events will carry payloads that provide information about the calendar entry: {1} entry title, {2} calendar feed name, {3} description, {4} date/start time, {5} date/end time, {6} location."

But the wiki (who i gess it's more updated) bring that:

http://voxcommando.com/mediawiki/index.php?title=Plugin_GgCal_Guide#Using_the_events_that_are_generated

Wich tells that the payload number 5 is not the date/end time but just the start time (and the 4 is the start date)
Is that anyway to bring the end of the event?

If i'm wrong just tell me and i will open a new topic

Thanks

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Questions about GgCal plugin
« Reply #7 on: June 03, 2016, 10:23:31 AM »
That's correct.  In the latest version of GgCal the payloads were changed and the wiki page is more up to date.  The action description for set event timers was wrong.

However here is an updated version of the plugin with the end time payloads added as {10} and {11}.

Replace the files in your VC plugins\GgCal folder with the files in the attached zip.

You will probably need to "unblock" the dll or Windows will prevent it from loading.

http://answers.microsoft.com/en-us/windows/forum/windows_7-security/windows-7-security-blocks-potentially-harmful-file/4f9a3014-06bc-46e6-802c-154f3de1ea38

** Attachment removed: Please see a newer version below: http://voxcommando.com/forum/index.php?topic=2451.msg22246#msg22246
« Last Edit: June 03, 2016, 12:49:49 PM by jitterjames »

nikeb

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 0
  • i got this.
    • View Profile
Re: Questions about GgCal plugin
« Reply #8 on: June 03, 2016, 11:15:45 AM »
Great thanks!

Do i need to give again the google permissions too?
Seemes like it's not working because of that.

I try to disable plugin, wipe the cache and enable it again but i didn't ask me any permissions again

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Questions about GgCal plugin
« Reply #9 on: June 03, 2016, 11:47:51 AM »
I did not need to give Google permission again, however if you are using an older version of VoxCommando it might not work because the plugin interface was updated.  I recommend you update to VC 2.2.1.7 but 2.2.1.6 is probably OK too.  I forget when I updated the plugin interface.

http://voxcommando.com/home/downloads/

Note that if you update VC you will need to replace and unlock the GgCal dll again.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Questions about GgCal plugin
« Reply #10 on: June 03, 2016, 12:33:45 PM »
Note that I made a mistake on the end date for all day events, so please give me a few minutes and I will upload a fixed version.  Sorry 'bout that.  :-\

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Questions about GgCal plugin
« Reply #11 on: June 03, 2016, 12:48:47 PM »
This should work: