• Not Answered

Having problems with your "Select <dictation>" KnowBrainer script

Hi Nora,

So I've gotten your very handy little KnowBrainer script (see below) to work, and can now select words I just dictated into the Studio target box by voice. However, very often it doesn't work. Sometimes, the word I am looking for is selected, but not in my current target box, but instead in a different target box either up or down. Other times, I am automatically taken to my browser or another open program. Not sure what is going on here.

Michael

Select <dictation>

Sub Main
SendKeys "^{PgUp}"
SendKeys "^f"
SendKeys ListVar1
Wait .1
SendKeys "~"
Wait .1
SendKeys "{Esc}"
End Sub
2 Replies Latest Replies: 19 Oct 2016 11:06 PM by Nora Díaz

2 Replies

  • Hi Michael,

    It sounds like you may need to add some wait time to the script. What happens if you use this?

    Sub Main
    SendKeys "^{PgUp}"
    Wait .2
    SendKeys "^f"
    SendKeys ListVar1
    Wait .1
    SendKeys "~"
    Wait .1
    SendKeys "{Esc}"
    End Sub

    Other things to check:

    - Does Ctrl+PgUp take you to the beginning of the segment? (to make sure the above script would work as intended on the current segment instead of launching a document-wide search operation)
    - Do you have any similar-sounding commands for opening other programs? (this could be the reason why you're taken to another program). This should be solved if the command is application-specific, so the next thing to check: Is the command for Studio only or global?
  • In reply to Nora Díaz:

    Thanks!

    OK, I seem to have gotten it to work, using the following:

     

    The HTML Clipboard

    Sub Main
    SendKeys "^{PgUp}"
    Wait .2
    SendKeys "^f"
    Wait .2
    SendKeys ListVar1
    Wait .2
    SendKeys "~"
    Wait .2
    SendKeys "{Esc}"
    End Sub

     

Related