Last active
August 29, 2015 14:06
-
-
Save mekkablue/e38115c89f1e84dadba6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE | |
def runAppleScript(scpt, args=[]): | |
p = Popen(['osascript', '-'] + args, stdin=PIPE, stdout=PIPE, stderr=PIPE) | |
stdout, stderr = p.communicate(scpt) | |
return stdout | |
nameOfFont = """ | |
tell application "InDesign" | |
tell front document | |
tell character 1 of parent story of first text frame | |
applied font | |
end tell | |
end tell | |
end tell | |
""" | |
print "---%s---" % runAppleScript(nameOfFont).strip().replace("\t",">>>") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment