Editing Pages Document via applescript

Hi there,

I created a new document in Pages and now I want an Applescript to change the paper size (and later on a few more things) to A5

Unfortunately I am not able to write that script and I also don't get the pages dictionary in Applescript Editor.

Can anyone write that script for me?

Thanks in advance!

shorlie

Mac Pro, OS X Mountain Lion (10.8.2)

Posted on Sep 22, 2012 6:54 AM

Reply
12 replies

Sep 23, 2012 10:18 AM in response to Shorlie

Shorlie,


I did it the old fashioned way; I looked the paper size up on Wikipedia, and used the (American arrogance here) dimensions of 8.27 inches by 5.83 inches which I multiplied by 72 points per inch to get what I used.


That is not the "right" way, though. I should have formatted a Pages document in A5 and then run the AppleScript;


User uploaded file


and used the result from that.


And thanks for the other points, too.

Sep 23, 2012 4:22 AM in response to Shorlie

Hi everybody! Thanks for your help so far! The reason is:

In Pages there are no macros as far as I know. So I want to write little scripts, save them as an .app and create a shortcut for executing it over the keyboard.

I know I can change the paper size via the menu, but I'd like to do so using a shortcut. Of course I could also establish a template but I'd like to learn some applescript, too.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Editing Pages Document via applescript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.