Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Haddood

Pages: 1 2 [3] 4 5 ... 9
31
VoxCommando Basics and Core Features / Delete request in scrape
« on: March 29, 2015, 01:17:05 AM »
is there a way to send a delete request using scrape ?

32
VoxCommando Basics and Core Features / Watching RSS
« on: March 28, 2015, 08:19:09 PM »
Anybody have an idea about how to watch RSS Feed and trigger an event when a new entry added?

33
Tips and Tricks / Using maps to replace multiple ifs
« on: March 27, 2015, 06:58:38 PM »
now and then I face a command where I need many ifs (to simulate a switch command) ... and the command does not look efficient ...
today I had this idea to make this very simple. By replace the multiple ifs with values from a map ....
images explain it all ...

for sure for 3 ifs is not a big deal, apart from being neat ... but in case of 50, this will be a big difference


34
XML Exchange / Local Movies
« on: March 27, 2015, 01:10:31 AM »
here is a revised version of Local Movies posted here http://voxcommando.com/forum/index.php?topic=1140.msg9577#msg9577 that works with VC v.2
it is very simple command... if I find time I am planning on adding show times (for seven days), theatres, director ...etc.

I limited the list to ten movies ... as if you are in big city the list can grow super long

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<command id="176" name="local movies today" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>http://www.imdb.com/showtimes/location/CA/{M:Variables.PostalCode}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegExSingle</cmdType>
    <params>
      <param>&lt;h3\sclass="lister-item-header"&gt;.*?&lt;a\shref="/.*?&gt;(.*?)&lt;/a&gt;</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.MatchConcat</cmdType>
    <params>
      <param>{CR}</param>
      <param>10</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>local movies today</phrase>
</command>

35
Bug Reports / Status variable gives the previous status 2
« on: March 19, 2015, 03:11:39 PM »
in version 2.142 it seems the status variable is listing the previous status

I am testing this command and the LED Colour lists the previous Status ...

(it will be great to have to variables, Status and Previous Status)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<command id="862" name="LED Control" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{status}&amp;&amp;on</ifParams>
    <then>
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>LEDcolour("Green")</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{status}&amp;&amp;off</ifParams>
    <then>
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>LEDcolour("Red")</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{status}&amp;&amp;standby</ifParams>
    <then>
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>LEDcolour("Yellow")</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <event>VC.On</event>
  <event>VC.Standby</event>
  <event>VC.Off</event>
</command>

36
(requires 2.207 min + updated dll for 2.207 from here http://voxcommando.com/forum/index.php?topic=2299.msg19889#msg19889) to simulate a bit of human interaction with VC ... this command will make VC repeat what it just had said

ex: VC what time is it?
      it is quarter past two
      I beg your pardon
      it is quarter past two

note:if you change the phrasing make sure to revise the if statement to avoid infinite loops where VC keep on telling itself, can you repeat do not apply to updated command

update: the previous command had an issue. the it makes VC redo the action ...not only speaking the text (see discussion below)

the old command has been renamed to repeat last action and improved based on marcus post below ... (this should work with older releases of version 2)

I beg your pardon command

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.7-->
<command id="354" name="I beg your pardon" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>TTS.GetLastText</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>can you repeat, I beg your pardon, say that again</phrase>
  <phrase optional="true">that</phrase>
  <phrase optional="true">?</phrase>
</command>

Repeat last action

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.7-->
<command id="358" name="Repeat Last Action" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="True">
    <ifType>(A)==(B)</ifType>
    <ifParams>{LastSpoken}&amp;&amp;{PreviousSpoken}</ifParams>
    <then>
      <action>
        <cmdType>VC.TellVox</cmdType>
        <params>
          <param>{PreviousSpoken}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase>do it again, repeat last action</phrase>
</command>

37
Other Plugins / Skype plugin questions
« on: March 16, 2015, 05:13:32 AM »
1. Is there is a way to turn on video for an ongoing call ? I know using uri one can start a video call ...
2. I am no longer receiving  Skype.clsFinished.cltIncomingP2P� Event. Skype version 7.0.0.102
3. Does anybody knows where I can download older Skype versions. Or if some has some old version is willing share (I do not think there is copyright issues here). Version 6.22.64.106 will be great

Tx for any insights

38
VoxCommando Basics and Core Features / Focused window
« on: March 11, 2015, 09:16:08 PM »
Is there a way to retrieve what process or app currently focused ?
I am using manual tracking using window.focus ... But I am hoping for a neater solution

39
Bug Reports / Kinda Bug
« on: March 06, 2015, 03:01:05 PM »
Again this is one of the things that is in a grey zone to be considered a bug... I think

when in standby mode VC still generate the Alternates event even without a prefix.

in theory the Alternates event is generated on VC when it hears things not very clearly. I think, it is logical that this event is not generated in standby mode until a prefix.start event triggers.
I solved this manually, by disabling the group in which I placed the macro that runs with alternates event. However VC still display the options OSD, and history window is filled with lots of lines

PS: version is 2.1.4.2 (can't remember if older versions had similar behaviour)

40
I have weather command (based on nime5ter command  http://voxcommando.com/forum/index.php?topic=1755.msg15262#msg15262 ) with 2 payloads, the second is the location and is optional. So if I say what is the weather forecast for today, it will give me that of my city and if I say what is the weather forecast for today in Buenos Aires it will give that of Buenos Aires ...

I would like to make the first payload optional (to avoid saying for today), however a complication arises, if I say what is the weather forecast for Buenos Aires, it will take Buenos Aires as payload 1  and the command won't function properly.

is there a way to determine which payload was passed to the command, or any other approach to tackle problem of this type?

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="384" name="Weather forecast" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>ProcessRunning</ifType>
    <ifParams>Kodi&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>XJson.Connect</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.TriggerEvent</cmdType>
        <params>
          <param>Kodi.Cmd.Weather</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{#P}&amp;&amp;2</ifParams>
    <then>
      <action>
        <cmdType>WUnder.Change</cmdType>
        <params>
          <param>{2}</param>
          <param>en</param>
          <param>c.</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>WethLoc</param>
          <param>in {PF.2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>WethLoc</param>
          <param><![CDATA[ ]]></param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>weather({1})</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>WUnder.GetCustom</cmdType>
    <params>
      <param>Weather {var.WethLoc} for {{var.day}.weekday}: {{var.day}.conditions}, with high of {{var.day}.high} degrees Celsius and a low of {{var.day}.low} degrees. There's a {{var.day}.pop}% chance of precipitation, with winds averaging {{var.day}.avewind} km/h.</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>feedback</param>
      <param>{LastResult}</param>
      <param>2</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>WUnder.Change</cmdType>
    <params>
      <param>Montreal, Quebec</param>
      <param>en</param>
      <param>c.</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>WethLoc</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>Weather.Info</event>
  <phrase>What is the</phrase>
  <phrase>weather, forecast, weather forcast</phrase>
  <phrase>for</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\weather_day.xml</payloadFromXML>
  <phrase optional="true">in</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="True">payloads\Weather Locations.xml</payloadFromXML>
  <phrase optional="true">?</phrase>
</command>

41
Bug Reports / Command tree display hiccup
« on: February 18, 2015, 12:18:35 AM »
this is more a hiccup than a bug :)
if I remember correctly, in VC versions before implementing the command tree with new icons, optional payload used to show up in italic just like optional text .... which is not the case anymore in 2.1.3.8.

42
Python Scripting / Python questions
« on: February 12, 2015, 01:21:41 PM »
I have few questions regarding python that I could not find an answer here or in python documentation ...

1. recurring print function will eventually make the Python log (that we see in Py plug-in window) eventually grow big.  will that lead to more memory consumption by VC?
2. is there a way to unload python script?
3. function declared in scripts are they global, I mean can I declare a function in script A and call it in script B?
4. would reloading the scripts overwrite the older one, ex. a script that has a loop that triggers event ... if loaded twice will the event be triggered twice?

tx for any feed back

43
Feature Requests / RoboB feature
« on: February 10, 2015, 05:00:22 AM »
Robob plug-in features a list of open robob instances and which page they are at, in its window from plug ins menu.
It would help a lot if we can access this list in some way programmatically to retrieve the instance name (created by using select) and the current link ...
Application for this are many, Most important that comes to mind:
- Close extra session to reduce VC foot print in memory, I noticed each instance of robob increase memory needed for VC by about 30mb
- check if a page is already open before issuing navigate option, which would improve the performance of robob based command speed by avoiding unnecessary reopening or refreshing pages
- timed actions based on current url of a page, ex. One command to Refresh a page in various intervals, based on the current url... If it is plane tracking map, refresh every 1 hour, if it is airport status, refresh every 10 minutes ... Etc. this brings to mind, a refresh command in robob will Be very appreciated as well :)

maybe it could be returned as pairs of match x.1 for instance name and x.2 for the url

44
Other Plugins / Another RoboB Question
« on: February 09, 2015, 05:45:47 AM »
Searched the forums for this but no luck to find an answer... is there is way to check programmatically for the RoboB List ? to see if a certain page is open ... as well if there is a way to list created instances with the select action?

45
this is a simple trick using windows task scheduler to notify VC when a user log in to PC or unlock it. in a similar way one can create a task when work station lock
it can be used to turn on the desk lamp, or make a funny comment, or trigger a timer that will remind the user to relax his/her eyes ...etc.

it uses the udp sender command line tools that is part of extras that one can download from the download page

open task scheduler then import the attached xml
it must be imported for every user if there is more than user on the PC and we want VC to interact with various users

for every user the run task under user must be adjusted ... and the path to where udp sender is placed

Pages: 1 2 [3] 4 5 ... 9