似乎Finder中没有“Show Path Bar”的内置键盘快捷键。我怎样才能创建一个?
似乎Finder中没有“Show Path Bar”的内置键盘快捷键。我怎样才能创建一个?
Answers:
用一个 火花 这将允许您从AppleScript创建键盘快捷方式。然后,创建一个AppleScript,单击菜单中的“显示路径栏”。
tell application "System Events"
set UI_enabled to UI elements enabled
end tell
-- Checks to see if UI scripting is enabled
if UI_enabled is false then
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.universalaccess"
display dialog "This script utilizes the built-in Graphic User Interface Scripting architecture of Mac OS x which is currently disabled." & return & return & "You can activate GUI Scripting by selecting the checkbox \"Enable access for assistive devices\" in the Universal Access preference pane." with icon 1 buttons {"Cancel"} default button 1
end tell
end if
if UI_enabled is true then
-- Actual code that clicks the button
tell application "Finder" to activate
tell application "System Events"
tell process "Finder"
tell menu bar 1
tell menu bar item "View"
tell menu "View"
click menu item 12
end tell
end tell
end tell
end tell
end tell
end if