automatically import txt-files with applescript into scrivener file


How can I import a text file with an applescript into a certain scrivener file?

I am this far:

tell application "Scrivener 2" activate open POSIX file "/Users/ak/Dropbox/Artikelvorlagen/Artikel-Entwürfe/Diktate-Artikel.scriv" end tell

What I miss is the line where I import a specific file within the variable theFile.
Alternatively I can Import all text files within a certain directory… For that I found this:

    keystroke "i" using {shift down, command down}

But then.I don’t know how to select the directory with via applescript :frowning:

Can you help me?

Scrivener has never supported AppleScript. I guess you could probably cook something up with Keyboard Maestro, but I’ve never tried it.