Dragon NaturallySpeaking: switching between Studio 2017 and Notepad

Due to Studio's lack of support for Dragon NaturallySpeaking I am composing most of my text in Notepad. Does anyone have any tips for macros to select all the text in Notepad then switch reliably to Studio's editing pane? (Too often I find that I end up in the concordance pane or some other subsection of the main window.)

I watched Nora's webinar a couple of weeks ago and found it useful, but have not yet bought the KnowBrainer utility, nor have I had time to implement any of her suggestions myself.

I have a very large project under way today, and already my left hand is starting to feel the impact of repeated alt+tabs from Notepad to Studio, so I am looking for some kind of short-term fix. I can look into something more sophisticated at a later date.

I am using Studio 2017 and Dragon Professional Individual.

Thanks in advance,
Dan

14 Replies Latest Replies: 15 Feb 2018 11:10 AM by Dan Lucas < 1   2   3  >
  • For now, a small autohotkey script seems to do the trick. Note that control + shift + e is nominally the shortcut for the editor, BUT the shortcut doesn't seem to work if I am in something like the concordance window i.e. It does not move to the target pane. Apologies for dodgy code formatting. Any suggestions still gratefully received.

    ; WinActivate SDL Trados
    if WinExist("ahk_exe SDLTradosStudio.exe")
    {WinActivate SDL Trados
    {If WinExist("wip - Notepad")
    ;MsgBox, "found notepad for SDL"
    WinActivate ; use the window found above
    else
    MsgBox "Notepad not running"
    WinWaitActive
    send ^a
    sleep 50
    send ^c
    sleep 100
    WinActivate SDL Trados
    send ^+e
    sleep 50
    send ^a
    sleep 50
    send ^v
    }
    }

  • In reply to Dan Lucas:

    Hi Dan,

    I think the inability to select a specific view part in Studio is frustrating. I have also experimented with a couple of AHK scripts for other things that I can't get to work reliably because I occasionally end up in the wrong view part.

    A few suggestions: did you try Dragon's own dictation window instead of Notepad? It has a bulit-in "Transfer" button and it will automatically transfer the text for you to the segment where your cursor was when you started.

    My second suggestion, although I understand you're pressed for time, is that KnowBrainer has a 30-day free trial, so no need to make a financial commitment right away.

    And the last one is, since you have the Professional version of Dragon, you don't really need KnowBrainer, you can write your scripts directly in Dragon, if you want to go that route.

    Happy dictating!

  • Hi Dan,

    Sorry for not replying sooner!

    I am not sure whether this is the default, but I have "Activate Display Filters" set to the keyboard shortcut Ctr-Alt-F6.
    When I use this shortcut, the cursor returns to the current target segment if it is anywhere else in the Editor pane. Try it out.

    I also defined some handy keyboard shortcuts for use in DPI commands:

    Editor (pane) Ctr-Alt-Shift-E  <--- use to move to the Editor pane
    Files (pane) Ctr-Alt-Shift-F
    Projects (pane) Ctr-Alt-Shift-P
    Reports (pane) Ctr-Alt-Shift-R
    Welcome (pane) Ctr-Alt-Shirt-W

    and

    Options (dialog) Ctr-Alt-Shift-O

    When you are ready to move from Word or Notepad or whatever to Studio, write your DPI command so that it switches to Studio, then uses Ctr-Alt-Shift-E to make sure you are in the Editor pane and then uses Ctr-Alt-F6 to make sure you are in the current target segment.

    Best regards,
    Bruce Campbell
    ASAP Language Services

  • In reply to Bruce Campbell:

    If anyone is curious, here are the DPI commands I use to copy a series of segments from Word to Studio. (See at the end of this post)

    I dictate into Word. At the end of each segment, I dictate a "new line" to insert a hard line break (CRLF: carriage return + line feed).

    When I have a series of segments, each in its own paragraph, I move to the top of the list and use the command "copy list" (see below). This command copies the segments in each paragraph, stores them in the registry and then switches to the current target segment in Studio.

    (Note that a soft line break in Word (LF: line feed) will be converted to a soft line break in Studio.)

    In Studio, I then use the command "paste list" to copy what were originally paragraphs in Word one-by-one into the segments.

    If I want to skip over one or more segments (e.g. they already have translations), then I insert a paragraph that only has "<>" in it.

    Whenever the "paste list" command finds a paragraph that is "<>" it uses the Ctrl-Down command to skip over everything to the next unconfirmed segment. Then it continues pasting. When everything has been pasted, it moves back up to the first segment that was pasted. I then review and confirm the segments one-by-one in Studio.

    Sometimes you get a surprise trying to use the "<>" to skip over segments (e.g. you miss a segment when you are dictating, so your sequence of segments does not match the sequence in Studio). So once I have translated a section I generally do a spellcheck, then a verify and lock them, so they don't accidentally get overwritten. (I have other Dragon commands that help with this.)

    If your sequence of segments in Word does not match the sequence in Word, you will notice this when you review the segments in Studio. It is usually not a big problem. You just confirm down the list of segments as far as you can in Studio and then go back to Word, make any changes needed and start the "copy list" command again part way down in your original list of segments in Word.

    Anyway, here are the Dragon commands. You might have to change the times in the "Wait" commands if your system is faster or slower than mine.

    The two commands use a crazy conversion routine to change each Unicode character to three ASCII characters. Before I added this conversion I had trouble with special Unicode characters, accented characters, etc. being converted to something else when they were pasted into Studio. The conversion is a bit complicated because I had to avoid the null ASCII character, which the registry uses to signal the end of a string.

    Best regards,
    Bruce Campbell
    ASAP Language Services

     

    DPI command: “copy list”

    (I set this command to be active when I am in a particular Word file I have named “SDL.docx”)

    Sub Main

    Dim i, j, k, a, b, c As Integer

    CR$ = Chr$(13)

    LF$ = Chr$(10)

    CRLF$ = CR$ + LF$

    T$ = ""

    Do

      SendKeys "^+{Down}", True       ' copy next paragraph into S$

      SendKeys "^c", True

      Wait 0.1

       S$ = Clipboard$()

      SendKeys "{Right}", True            ' go to start of next paragraph

      S$ = Replace(S$, CR$, "")             ' get rid of CRs and trailing LF

      If Right(S$,1) = LF$ Then S$ = Left(S$, Len(S$) - 1)  ' there could still be

      S$ = Trim$(S$)                                                       ' LFs in the string

      If Len(S$) <> 0 Then T$ = T$ + S$ + CRLF$   ' add S$ and CRLF to end of T$

    Loop Until Len(S$) = 0   ' loop until you get an empty paragraph

    If Len(T$) <> 0 Then

      List$ = ""

      i = 1

      j = Len(T$)

      Do

        k = AscW(Mid(T$,i,1))         ' convert each character in T$ to a

        c = (k And 127) Or 128       ' crazy ASCII equivalent that can

        k = (k And 65408)\128        ' be stored in the Windows registry

        b = (k And 127) Or 128

        k = (k And 65408)\128

        a = k Or 128

        List$ = List$ + Chr(a) + Chr(b) + Chr(c)

        i = i+1

      Loop Until i > j

    End If

    SaveSetting "MyDNS", "MyList", "List", List$   ' save the whole thing in the registry

    HeardWord("switch", "to", "SDL Trados Studio")   ' switch to Studio

    Wait 0.5

    SendKeys "^%+E",True     ' switch to the Editor pane

    Wait 0.1

    SendKeys "^%{F6}",True   ' go to the current target segment

    Wait 0.1

    End Sub

     

    DPI command: “paste list”

    (I set this command to be active when I am in SDL Trados Studio)

    Sub Main

    Dim i, j, k, a, b, c As Integer, x as Long

    CR$ = Chr$(13)

    LF$ = Chr$(10)

    CRLF$ = CR$ + LF$

    T$ = GetSetting$("MyDNS","MyList","List")   ' get the text from the registry

    List$ = ""

    i = 1

    j = Len(T$)

    Do

      a = Asc(Mid(T$,i,1))

      i=i+1

      b = Asc(Mid(T$,i,1))

      i=i+1

      c = Asc(Mid(T$,i,1))

      i=i+1

      x = (a And 127)                       ' convert from crazy ASCII coding

      x = x*128 + (b And 127)          ' back to original text

      x = x*128 + (c And 127)

      List$ = List$ + ChrW(x)

    Loop Until i > j

    i = 1

    j = InStr(i, List$, CRLF$)         ' find the first original paragraph

    k = 0

    Do While j <> 0      

      S$ = Mid(List$, i, j-i)

      If S$ = "<>" Then                        ' if you find a paragraph that is "<>"

        SendKeys "^{Down}", True         ' then skip to next unconfirmed segment

      Else

        Clipboard S$                              ' copy paragraph to the clipboard

        SendKeys "^a", True                  ' and use it to replace whatever is

        SendKeys "^v", True                  ' in the target segment

        SendKeys "{Right}", True           ' move to the next segment in Studio

      End If

      i = j + 2                            ' skip over CRLF

      j = InStr(i, List$, CRLF$)    ' find the next paragraph

      k = k + 1                          ' keep track of how many segments you have moved down

    Loop

    Wait 0.1

    SendDragonKeys "{Ctrl+Up " & k & "}"    ' move up the same number of segments

    End Sub

  • In reply to Bruce Campbell:

    I forgot to mention once again that the Ctr-Alt-Shift-E shortcut used in the commands above is not a standard Studio shortcut.

    If you use the DPI commands above, you will have to set this as the shortcut for the Editor (panel).

    And check that Ctr-Alt-F6 is the shortcut for "Activate Display Filters". I don't know any more whether this is a standard Studio shortcut.

    Best regards,
    Bruce Campbell
    ASAP Language Services

< 1   2   3  >
Related