Thread View: adobe.photoshop.scripting
3 messages
3 total messages
Started by richard_baguley
Mon, 16 Mar 2009 00:38
Setting width of a new document
Author: richard_baguley
Date: Mon, 16 Mar 2009 00:38
Date: Mon, 16 Mar 2009 00:38
6 lines
904 bytes
904 bytes
Evening all, I am trying to set up an AppleScript that opens a new document 100 pixels by 100 pixels. But when I try the code below, it opens a document 100 inches wide. How do I set the size to pixels?
My code:
make new document with properties {height:100, width:100}
I've tried specifying that as 100px or 100 pixels, but neither of them worked. Any ideas?
Re: Setting width of a new document
Author: fazstp
Date: Mon, 16 Mar 2009 03:01
Date: Mon, 16 Mar 2009 03:01
3 lines
669 bytes
669 bytes
Did you try
make new document with properties {height:100 as pixels, width:100 as pixels}
Re: Setting width of a new document
Author: richard_baguley
Date: Mon, 16 Mar 2009 14:18
Date: Mon, 16 Mar 2009 14:18
6 lines
1010 bytes
1010 bytes
Actually, I figured out that I had not set the ruler units correctly, and the program was defaulting to inches. I added these two lines at the top of the script and they fixed it: tell application "Adobe Photoshop CS4" -- set the units to pixels set ruler units of settings to pixel units set type units of settings to pixel units
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads