2012-02-11 13 views
2
なしにオープンの画像ではないでしょう
tell application "Adobe Photoshop CS5.1" 
set myFile to (choose file) as string 
open file myFile 
end tell 

これは、どのようなファイルを開くために私を求めて開く2つの別々のダイアログになり....それは私が最初に選択するかは重要ではありません、それは第二に尋ねます時間は2番目を開きます。Photoshopのスクリプティング - プロンプト

は、私がオープンしたいことはPDFですので、私は本当にしたい:

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 

結果:

Error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop 

すべての権利、より直接的なアプローチ:

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 

ファイルをエイリアスの設定が失敗する可能性があります。だから私は何を得るのですか?

"Error: -43. Adobe Photoshop CS5.1 got an error: File some object wasn’t found." 

I had asked over on the Adobe forums, with no response.もし興味があるなら、私は本当に使用しようとしている完全なコードがあります。問題の内容を理解するために基本的な内容に減らしました。

設定がありませんか?私は何が間違っているのか分かりません。

答えて

1

ありThe Photoshop 5辞書ではひどい問題です。 1つのアイデアは、多くの問題を「解決する」32ビットモードで試してみることです。さらにダイジェストしてくださいhttp://forums.adobe.com/message/2822670#2822670?tstart=0#2822670

+0

私は何かを見つけることができました.Imageを設定しようとしました。(プロンプト "画像ファイルを選択してください:")文字列としてAppleScript辞書のStandardAdditionsから アプリケーション "Adobe Photoshop CS5"を教えてください オープンエイリアスtheImage - "オープンファイルtheImage"(引用符なし)も機能するはずです。 end tell – Lithodora

1

CS5の問題かもしれませんが、正直に分かりません。

これはしかしCS4で、私のためにうまく働いた:

tell application "Adobe Photoshop CS4" 
    set myFile to (choose file) as alias 
    with timeout of 300 seconds 
     open myFile as PDF with options {class:PDF open options, mode:CMYK, resolution:300, use antialias:true, page:1} 
    end timeout 
end tell 

唯一の本当の違いは、(私が見ることができる)私が選択したファイルをaliasことで、open ...を呼び出す - ないopen file ...

+0

これはCS4で動作しますが、おそらくそれが実際の解決策です。 CS5では、「エラー:-43。Adobe Photoshop CS5.1でエラーが発生しました:オブジェクトが見つかりませんでした」という結果が表示されます。 – Lithodora

関連する問題