Author Topic: skip forward/back some time  (Read 5242 times)

0 Members and 2 Guests are viewing this topic.

Bleazle

  • $upporter
  • Contributor
  • *****
  • Posts: 60
  • Karma: 1
    • View Profile
skip forward/back some time
« on: January 17, 2012, 04:36:57 PM »
Just checked that.. unfortunately not... it's not a big deal on this client though. When I get a chance I'll try VC on my HTPC and see how that goes - better sound card etc.

I worked out the command I was trying to come up with last night but now I'm stuck on another one  :-\ I want to be able to say "skip (forward, back) (1,3,5) minutes" - I've worked out how to make a command for each option eg. "skip forward 1 minute" and could do that for all options but I'm guessing there must be a better/tidier way? I have edited the payload/4directions.xml to include:

 </payload>
       <payload>
        <value>forward</value>
        <phrase>forward</phrase>
    </payload>
       <payload>
        <value>back</value>
        <phrase>back</phrase>
    </payload>

and have played around with variations of the following. I've got no idea what "(A)==(B)" etc means so I took a stab at "contains"... where do I go from here? scrap it and start again?  ::)  ;D

Cheers

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
skip forward/back some time
« Reply #1 on: January 17, 2012, 05:05:19 PM »
well, that is not the approach that I would take.  It would probably be easiest if you just make 4 different commands and don't use any payloads or logic.

I also notice that you are using (i.e. have modified) the payloadXML file "4directions.xml" when you really should be creating a new payloadXML named something like forwardback.xml.  If you have any other commands that were using that they will be broken now.

If you decide in the future to use the Logic block with AcontainsB then you would put values in both boxes.  It will check if the second box is a substring of the first box.

example:  if   (A)Contains(B)         I like food!     foo

this would be true since   "I like food!" contains the string "foo"
since it's true, any actions in the "Then" box will be executed.

In your case, to see if they said left you would probably do
 if    (A)Contains(B)          {1}     left

but it would actually make more sense to use
if (A)==(B)         {1}     left

also if you payload is going to be either "forward" or "back" then you should be checking if {1} = "forward", not "right".

ideally your commands should be doing a seek relative instead of using arrows since you may once day decide to edit your skip steps in MP.

take a look at the command "seek forward X percent"

If you want I can make something that works in seconds

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
skip forward/back some time
« Reply #2 on: January 17, 2012, 05:17:19 PM »
ha ha.  ooooh the English language.

By "in seconds", I did not mean that it would take mere seconds to make it  ::duh

I meant it could seek in relative seconds, instead of seeking relative percent.  :biglaugh

shango

  • $upporter
  • Sr. Member
  • *****
  • Posts: 104
  • Karma: 0
  • No English flag :(
    • View Profile
skip forward/back some time
« Reply #3 on: January 17, 2012, 05:20:43 PM »
But I'm sure it would only take you seconds to do though :)

All sounds very complicated to me. I'll stick with activate window commands for the time being I think.

bout to do the upgrade, if i can't figure out how to import my custom commands, I shall be back before the night is out. :)

bodiroga

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 1
    • View Profile
skip forward/back some time
« Reply #4 on: January 17, 2012, 05:22:38 PM »
ha ha.  ooooh the English language.

By "in seconds", I did not mean that it would take mere seconds to make it  ::duh

I meant it could seek in relative seconds, instead of seeking relative percent.  :biglaugh

 :biglaugh :biglaugh :biglaugh :biglaugh :biglaugh

And in minutes instead of seconds?  ;)

Best regards,

Aitor

PS: I'm so sorry that the conversation with DieBagger wasn't as we expected to be, my apologizes  :(

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: skip forward/back some time
« Reply #5 on: January 17, 2012, 05:45:24 PM »
here's the command and a payload file.  I would consider this "only for the advanced class"...

see if you can figure out what is happening, but if not I will explain.  It's a good opportunity to learn about more advanced techniques.

make sure to put "timesToSeconds.xml" into your payloads folder, and then drag the xml file  "VcGrp_..." into your command tree to import it.

Bleazle

  • $upporter
  • Contributor
  • *****
  • Posts: 60
  • Karma: 1
    • View Profile
Re: skip forward/back some time
« Reply #6 on: January 17, 2012, 09:35:51 PM »
I'm having fun with this one  :) I had TTS set up to say "skipping forward (or back, as appropriate) XXX minutes" but of course the XXX was being said in seconds and I couldn't work out how to change that to minutes. So now I've changed it so say "skipping XX minutes" - which is OK, but ideally it should say "back" or "forward" as well - is there a way that I can say "if {1} = forward and {2} = 300 then TTS.Speak "skipping forward 5 minutes" (and obviously if {1} doesn't = forward then say "skipping back 5 minutes") etc?

Sorry for the amateur hour questions... maybe I should go and lean a bit of C++ or whatever this is....

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: skip forward/back some time
« Reply #7 on: January 17, 2012, 09:57:02 PM »
{1} already contains the value "forward" or "back" so your TTS can be

skipping {1}

and it will either say "skipping forward" or "skipping back"

Bleazle

  • $upporter
  • Contributor
  • *****
  • Posts: 60
  • Karma: 1
    • View Profile
Re: skip forward/back some time
« Reply #8 on: January 17, 2012, 10:12:31 PM »
{1} already contains the value "forward" or "back" so your TTS can be

skipping {1}

and it will either say "skipping forward" or "skipping back"

 :bonk :bonk :bonk

That was easy! Bummed out now that I didn't work it out myself!  :bonk :bonk :bonk

Thanks!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: skip forward/back some time
« Reply #9 on: January 18, 2012, 03:11:30 AM »
:bonk :bonk :bonk

That was easy! Bummed out now that I didn't work it out myself!  :bonk :bonk :bonk

Thanks!
Bleazle, you can use the TTS with the two xml files from James, and modify as follow (see picture)

When you say "skip forward 1 minute" -> MP skip 1 minute forward and TTS says -> "skip one minute forward was performed"
the {LastSpoken} parameter is what you have write to "phrase" in the timesToSeconds.xml when it has VC recognized  ;)

Kalle
« Last Edit: January 18, 2012, 03:14:22 AM by Kalle »
***********  get excited and make things  **********