kassadin
2016-04-21 18:33:45 +08:00
display dialog "是否显示.隐藏文件" buttons {"显示", "隐藏"} with icon 2 with title "Switch to presentation mode" default button 1
set switch to button returned of result
if switch is "隐藏" then
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool false;killall Finder"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool true;killall Finder"
end if
脚本编辑器保存成 app
显示 /隐藏桌面
display dialog "桌面图标设置为可见或隐藏?" buttons {"可见", "隐藏"} with icon 2 with title "Switch to presentation mode" default button 1
set switch to button returned of result
if switch is "隐藏" then
do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder"
else
do shell script "defaults delete com.apple.finder CreateDesktop;killall Finder"
end if