Mou - Service

Mr.Milk's Avatar

Mr.Milk

25 Feb, 2012 10:01 PM

Here is the missing "Open Current File in Marked" service for "Mou" application:

else if frontApp is "Mou" then

tell application "System Events"
    set f to text 17 thru -1 of (value of attribute "AXDocument" of first window of process "Mou" as text)
end tell

else if ...

  1. Support Staff 1 Posted by Brett on 25 Feb, 2012 10:14 PM

    Brett's Avatar

    Thanks! I'll get it added for the next update.

  2. 2 Posted by tg on 19 Jul, 2013 05:40 AM

    tg's Avatar

    The current Mou service will not open a file if the filename contains spaces, e.g. abc def.txt.

    I added to the .applescript file as follows and it seemed to work:

    else if frontApp is "Mou" then
    tell application "System Events"
    set f to text 17 thru -1 of (value of attribute "AXDocument" of first window of process "Mou" as text)
    end tell
    --replace "%20" with space in file path
    set TempTID to AppleScript's text item delimiters
    set AppleScript's text item delimiters to "%20"
    set f to text items of f
    set AppleScript's text item delimiters to space
    set f to f as string
    set AppleScript's text item delimiters to TempTID
    else if...

    Would appreciate if anyone can suggest a better way. Thank you

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac