Problems with macro to convert clipboard→ RTFD → Pages format

Have you tried simply writing your RTFD to file, opening it in Pages, saving the Pages doc? You shouldn't need any AS at all, just simple KM actions.

Otherwise:

This is not how you concatenate strings in AS -- you use the & symbol. So if you want to add ".pages" to the of myVar it would be

set myVar to (myVar & ".pages")

But using the ~ symbol for "starting at my home directory" doesn't work in AS. The easiest way round that is to "Filter: Standardize" your path in KM to give an absolute POSIX path -- and you might as well add ".pages" to the KM string before you do that then pass the complete absolute POSIX path to your AS.

1 Like