VoxCommando
Help and Support (Using VoxCommando) => RegEx (Regular Expressions) => Topic started by: rio14 on June 03, 2016, 03:40:57 AM
-
Hi
is it possible , VC search and read the currency exchange rate of the canadian dollar in the column (achat) from anyone of these Tunisian bank sites thank you
http://www.bna.com.tn/devise.asp (http://www.bna.com.tn/devise.asp)
http://www.biat.tn/biat/Fr/cours-de-change_66_127#? (http://www.biat.tn/biat/Fr/cours-de-change_66_127#?)
-
Yes it is of course possible. Here is a guide.
http://voxcommando.com/forum/index.php?topic=1699.0
If you do not wish to figure out how to do it yourself perhaps you should hire someone to do it for you. ;)
-
Here's a hint though since Regular Expressions can be a bit tricky.
For the first site, after you scrape the data you can use Results.RegExSingle (http://voxcommando.com/mediawiki/index.php?title=Actions#RegExSingle) with the following pattern:
Dollar\sCanadien.*?(\d,\d*)
-
hi James
yes i hire one to do this request for me, why not but not for this, i give 100$ for who make some thing to use google voice recognition in VC, for personal use at least, who is the second donator(not tasker and autovoice) :biglaugh
thank you for your help the code works <?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.6-->
<commandGroup open="True" name="Currency exchange" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="1265" name="change BNA Bank" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="20" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://www.bna.com.tn/devise.asp</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExSingle</cmdType>
<params>
<param>Dollar\sCanadien.*?(\d,\d*)</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param> the exchange rate for the canadian dollar is {Match.1.1}. </param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param> the exchange rate for the canadian dollar is {Match.1.1}.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.TriggerEvent</cmdType>
<params>
<param>Google.TTS</param>
<param> العملة الكندية, لهذا اليوم, بالدينار التونسي {Match.1.1}</param>
<param>ar</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<phrase>what is the exchange rate for today</phrase>
</command>
</commandGroup>