title: Photoshop Scripting with Applescript -- will not open images without a prompt
body: <pre><code>tell application "Adobe Photoshop CS5.1"
  set myFile to (choose file) as string
  open file myFile
  end tell
  </code></pre>
  
  <p>This results in 2 separate dialogs opening asking me what file to open.... It doesn't matter what I select first, it asks a second time and opens the second.</p>
  
  <p>What I want to open is a PDF, so I really want:</p>
  
  <pre><code>tell application "Adobe Photoshop CS5.1"
  set myFile to (choose file) as string
  open file myFile as PDF with options {class:PDF open options, mode:CMYK, resolution:300, use antialias:true, page:1} showing dialogs never
  end tell
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>Error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop
  </code></pre>
  
  <p>All right a more direct approach:</p>
  
  <pre><code>tell application "Adobe Photoshop CS5.1"
  set myFilePath to alias "other: PREPRESS SAVE:GAMES:3Sudoku:20120213pzsud-v:sudoku 0213.pdf"
  with timeout of 300 seconds
          open myFilePath as PDF with options {class:PDF open options, mode:CMYK, resolution:300, use antialias:true, page:1} 
  end timeout
  end tell
  </code></pre>
  
  <p>The file exists or the setting of the alias would fail. So what do I get?</p>
  
  <pre><code> "Error: -43. Adobe Photoshop CS5.1 got an error: File some object wasn’t found."
  </code></pre>
  
  <p><a href="http://forums.adobe.com/message/4186126#4186126" rel="nofollow">I had asked over on the Adobe forums, with no response.</a> The full code I'm really trying to use is there if you're interested. I reduced it to basics to figure out what the problem is.</p>
  
  <p>Is there a setting somewhere that I am missing? I'm not sure what is wrong, the example out of the </p>