Skip to main content
Participant
August 18, 2011
Question

Converting simple AppleScript to JavaScript

  • August 18, 2011
  • 1 reply
  • 533 views

Hello to all,

I need to convert a simple AppleScript to JavaScript, but as I don't know one bit about JavaScript, is there anyone willing to help me out ?

Here is the AppleScript:

tell application "Adobe Photoshop CS5"

     activate

          set display dialogs to never

          set thisdoc to current document

          tell thisdoc

                    resize image resolution 300 resample method none

          end tell

end tell

Very simple script to resize some low-res pictures without touching final resolution.

Thanks !

This topic has been closed for replies.

1 reply

Paul Riggott
Inspiring
August 18, 2011

This will change the resolution only..

app.displayDialogs = DialogModes.NO;
activeDocument.resizeImage(undefined, undefined, 300, ResampleMethod.NONE);

olivgorAuthor
Participant
August 18, 2011

Thanks !

I really need to learn JavaScript…