Results 1 to 10 of 10

Thread: Issue with $rr.execute command

  1. #1
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,866

    Smile Issue with $rr.execute command

    I have an issue with an autoit script with several command in a same $rr.execute command.

    If i write:
    Code:
    $rr.execute("SETVOL;Winamp;10||SAY;"&$rr.getinfo("=$MESSAGEBODY$")&"||wait;0.5||SETVOL;Winamp;100")
    The volume is well set to 10, RR wait 0.5s , message is said and the vol is set to 100.

    My problem is that the third command don't wait that the second command (say message) is finished and the volume is not set to 100 but stay on the value 10.

    Where is the bug please ?

  2. #2
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,283
    if you are writing a script, try to do all what you can using AI code, you can have youre own AI speech function is not hard at all, you dont need the wait command, if you want to add speech function to youre script, i can show you how to do it.

  3. #3
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,866
    Quote Originally Posted by EL CAMINO View Post
    if you are writing a script, try to do all what you can using AI code, you can have youre own AI speech function is not hard at all, you dont need the wait command, if you want to add speech function to youre script, i can show you how to do it.

    Thanks, El Camino, i accept. If you have an example, i can try it

  4. #4
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,283
    try this little function.
    Attached Files Attached Files

  5. #5
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,866
    Quote Originally Posted by EL CAMINO View Post
    try this little function.
    Cool El Camino.

    Big thanks

  6. #6
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,866
    El Camino,

    It is exactly that which I needed.

    Can you say me what is the language number for each language (for me , the french)

    Thanks

  7. #7
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,866
    I think that i have found a good link.

    How can i to test what voice is used by the PC without use the case option?

    language type number for sapi

  8. #8
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,723
    Blog Entries
    1
    You can just remove the case statements, and it will use what ever you have set up as the computers default voice.

    Here is an example script I just put together. I added the ability to check the Winamp volume, and then return it to where it was. If you were listening to something at 50%, spoke the message, you probably would not want it to go to 100% volume when it finished speaking

    The below script will:

    - Set Winamps volume to 50%
    - Speak the artist and title of the currently playing song
    - Return the Winamp volume to what it was before the script was ran


    PHP Code:
    $rr ObjCreate("RideRunner.SDK")

    SpeakSongInfo()

    Func SpeakSongInfo()
        
    $sapi ObjCreate("SAPI.SpVoice")
            if @
    error then
                MsgBox
    (0''"Please ensure that you have Sapi Installed")
                Exit
            EndIf
        
    $CurrentVolume $rr.getinfo ("VOL;Winamp")
        
    $rr.Execute("SetVol;Winamp;" "50")
        
    $artist $rr.getinfo ("tagartist")
        
    $Title $rr.getinfo ("tagtitle")
        
    $sapi.Speak ("You are listening to " $Title " By " $artist)
        
    $sapi ""
        
    $rr.Execute("SetVol;Winamp;" $CurrentVolume)
    EndFunc 
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  9. #9
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,723
    Blog Entries
    1
    Ok, more tinkering here If you want to get a little fancier, you can ramp the volume down and back up again, for a smoother transition between the music and when it speaks.

    PHP Code:

    $rr 
    ObjCreate("RideRunner.SDK")
    Global 
    $CurrentVolume
    Global $DropVolume
    Global $MyCount
    $DropVolume 
    30 Winamp Volume to drop to when speaking
    $CurrentVolume 
    $rr.getinfo ("VOL;Winamp")

    RampVolumeDown()
    SpeakSongInfo()
    RampVolumeUp()

    Func SpeakSongInfo()
        
    $sapi ObjCreate("SAPI.SpVoice")
            if @
    error then
                MsgBox
    (0''"Please ensure that you have Sapi Installed")
                Exit
            EndIf
        
    $artist $rr.getinfo ("tagartist")
        
    $Title $rr.getinfo ("tagtitle")
        
    $sapi.Speak ("You are listening to " $Title " By " $artist)
        
    $sapi ""
    EndFunc

    Func RampVolumeDown
    ()
        For 
    $MyCount $CurrentVolume to $DropVolume step -4
            $rr
    .Execute("SetVol;Winamp;" $MyCount)
        
    Next
    EndFunc

    Func RampVolumeUp
    ()
        For 
    $MyCount $DropVolume to $CurrentVolume
            $rr
    .Execute("SetVol;Winamp;" $MyCount)
        
    Next
    EndFunc 
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  10. #10
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,866

    Smile

    These two examples are very cool. I shall use it on my new gmail notifier version .

    Thanks again to El Camino and John

Similar Threads

  1. Needed: BETA Testers for Google Earth Plugin
    By guino in forum RR Released Plugins
    Replies: 531
    Last Post: 08-24-2012, 04:25 PM
  2. Release new phoco integration preview
    By Robby BMW in forum Road Runner
    Replies: 544
    Last Post: 09-12-2009, 06:29 AM
  3. M4-ATX Power On Issue
    By PacketSniffer in forum Power Supplies
    Replies: 1
    Last Post: 04-24-2008, 11:00 PM
  4. .M3U issue "Play all" issue
    By Kimota in forum StreetDeck
    Replies: 0
    Last Post: 12-12-2007, 10:34 AM
  5. Video Full Screen On/Off issue - 1.1.0.9
    By Kimota in forum StreetDeck Bug Reports
    Replies: 1
    Last Post: 12-12-2007, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •