1

私は、Sal Soghoian の AppleScript 1-2-3 本からの便利な Finder ウィンドウ セットアップ スクリプト (以下) を使用しています。うまく機能しますが、設定されている 2 つのウィンドウの 2 番目のサイドバーの幅を広げても、変更に対する応答はありません。145 のままです。(最初のウィンドウは幅の変更に対応します) コメント?

tell application "Finder"
close every window
-- first window
open folder "Webclients" of folder "Documents" of home
set toolbar visible of the front Finder window to true
set the sidebar width of the front Finder window to 145
set the current view of the front Finder window to column view
set the bounds of the front Finder window to {16, 80, 550, 675}
-- second window
open folder "Documents" of home
set toolbar visible of the front Finder window to true
set the sidebar width of the front Finder window to 145
set the current view of the front Finder window to column view
set the bounds of front Finder window to {560, 80, 1000, 675}
select the last Finder window
end tell
4

2 に答える 2

0

2番目のウィンドウの幅を大きくすると、期待どおりに機能することがわかりました。たとえば、2番目のウィンドウの境界として{560、80、1500、675}を使用しました(1500に注意)。これらの境界では、サイドバーの幅は正しく、変更可能でした。したがって、これはウィンドウ幅とAppleがFinderウィンドウに適用しているいくつかの自動設定に関係する何らかの効果であるに違いありません。幸運を。

于 2012-10-10T15:19:57.143 に答える
0

最初にウィンドウの境界を設定してから、サイドバーの幅を広げます。

-- second window
open folder "Documents" of home
set toolbar visible of the front Finder window to true
set the bounds of front Finder window to {560, 80, 1000, 675}
set the sidebar width of the front Finder window to 200
set the current view of the front Finder window to column view
select the last Finder window
end tell  

Finder サイドバーの幅は、Finder ウィンドウの幅に比例します。

tell application "Finder"
    get sidebar width of window 1
        --> 136 //maximum value
    get bounds of window 1
        --> {-1, 44, 327, 235}//327-136 =191
end tell

tell application "Finder"
    get sidebar width of window 1
        --> 563 //maximum value
    get bounds of window 1
        --> {-1, 44, 754, 235}//754-563=191
end tell
tell application "Finder"
    get sidebar width of window 1
        --> 843 //maximum value
    get bounds of window 1
        --> {-1, 44, 1034, 235}//1034 -843 =191
end tell  
于 2012-10-11T06:14:09.957 に答える