私はこの非常に単純なAppleScriptを持っています:
tell application "Finder"
activate
set |Window| to get Finder window 1
set the current view of |Window| to icon view
set |View Options| to icon view options of |Window|
set the icon size of |View Options| to 256
set the label position of |View Options| to bottom
set the shows item info of |View Options| to true
set the shows icon preview of |View Options| to true
set the arrangement of |View Options| to arranged by name
end tell
これはマーベリックスまで完璧に機能しました。引き続き実行されますが、目的の効果が得られません。何も、絶対にもう何も起こりません。
OS Xの新しいバージョンで何が変わったか知っている人はいますか?
アップデート1:
Finderを再起動した後、変更が行われることに気づきました。したがって、この質問に関連している可能性があります(または関連していない可能性があります)。« Finderの更新/更新applescriptが10.8で機能しない»— 10.8で問題がなかっただけで、10.9でしか表示されませんでした。
今のところ役立つかもしれない簡単な修正は、スクリプトにウィンドウを閉じるウィンドウと開くウィンドウを追加することです。
tell application "Finder"
activate
set |Window| to get Finder window 1
set the current view of |Window| to icon view
set |View Options| to icon view options of |Window|
set the icon size of |View Options| to 256
set the label position of |View Options| to bottom
set the shows item info of |View Options| to true
set the shows icon preview of |View Options| to true
set the arrangement of |View Options| to arranged by name
set flipTarget to folder "Users" of startup disk
set targ to target of |Window|
set target of |Window| to flipTarget
set target of |Window| to targ
(* --close |Window|
--open targ
*)
end tell
理想的ではありませんが、誰かがこのバグを解決する方法を見つけるまでは。そして、私はそれをより良い説明を求めてバグと呼んでいます。するかもしれません。
スクリプトはウィンドウ1のターゲットを収集します。ウィンドウ1を閉じます。次に、ウィンドウ1であったもののターゲットを開きます。
このバグは、Mavericksでアプリケーション設定のplistファイルを開いて変更を加えた場合に関連していると思われます。10.9より前のバージョンのように、変更が有効にならない場合があります。これは、設定の読み取り方法と読み取り時期が変更されたためだと思います。記憶にあるものが大統領を手動の変更に引き継ぐように思われる。ただし、unixコマンドのデフォルトを使用すると、すぐに変更されます。
***更新* 1
マーティンの答えには、ターゲットをひっくり返すだけの良いアイデアがあります。しかし、ルートディレクトリで作業しないという問題があります。
それに対する簡単な答えは、特定のフリップターゲットを使用することです。このcaeでは、ユーザーのホームフォルダです。私たちは皆それらを持っています。
コードの最後の部分を更新し、古い部分をコメントアウトしました。
変更コードは
set flipTarget to folder "Users" of startup disk
set targ to target of |Window|
set target of |Window| to flipTarget
set target of |Window| to targ
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加