2016-05-06 6 views
0

同じプレビューウィンドウ内で複数の画像を開こうとしています。たとえば、複数の画像をプレビューのサイドバーにドラッグすると、1つのウィンドウの内側にきれいに表示されます。AppleScriptで1つのプレビューウィンドウで複数の画像を開く

このコードは、すべての画像を開きますが、別のウィンドウで:

-- Getting path to this file 
tell application "Finder" to get folder of (path to me) as Unicode text 
set currentLocation to result 

-- Open image results in Preview 
tell application "Preview" 
    open currentLocation & "img:weekdays_bar.png" 
    open currentLocation & "img:weekdays_pie.png" 
    open currentLocation & "img:months_bar.png" 
    open currentLocation & "img:seasons_bar.png" 
    open currentLocation & "img:seasons_pie.png" 
    open currentLocation & "img:am_pm_pie.png" 
end tell 

誰もが正しい方向に私を指すことができますか?

答えて

0

ただ、リストに写真を入れて、Preview

tell application "Finder" to set currentLocation to container of (path to me) as text 
set thePictures to {currentLocation & "img:weekdays_bar.png", currentLocation & "img:weekdays_pie.png", ¬ 
    currentLocation & "img:months_bar.png", currentLocation & "img:seasons_bar.png", ¬ 
    currentLocation & "img:seasons_pie.png", currentLocation & "img:am_pm_pie.png"} 
tell application "Finder" to open thePictures using application file id "com.apple.preview" 
+0

を使用してファイルを開くには、Finderを伝えるには魅力のように働きました。ありがとうございました! – cagrimmett

関連する問題