Possible issue with interaction with AppleScript

Shane's Avatar

Shane

05 Sep, 2017 01:30 AM

I use an Automator script to do some custom processing on my multimarkdown files and then run them through pdflatex a few times. The first stage uses AppleScript to get the file path from the app to feed to some shell scripting. Specifically, the following (inelegant) code:

on run {input, parameters}
    tell application (path to frontmost application as text)
        set currentPath to the file of the front document
        set x to POSIX path of currentPath
    end tell
    return x
end run

It runs fine in v3, but for some reason doesn't run with v4 so far. Is there something I'm doing wrong, or is there something in v4 that could be affecting AppleScripts like this? Thanks.

  1. Support Staff 1 Posted by Fletcher on 05 Sep, 2017 01:45 AM

    Fletcher's Avatar

    I added the Applescript definitions file from v3 to the next build. Your script seems to work, but I can't guarantee everything is working.

    Let me know if you find other things that used to work but don't now.

    Thanks,

    F-

  2. Fletcher closed this discussion on 05 Sep, 2017 01:45 AM.

Comments are currently closed for this discussion. You can start a new one.

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