mac os下程序窗口的最大化最小化快捷键实现
本文按署名·非商业用途·保持一致授权作者:
,发表于2007年04月27日21时36分
把下面的代码存为一个.scpt文件,然后在用quick silver(当然也可以用其他可设置键映射的软件)的triggers里设置键映射到这个文件。以下脚本来自DZone Snippets
tell application "System Events" if UI elements enabled then set FrontApplication to (get name of every process whose frontmost is true) as string tell process FrontApplication click button 2 of window 1 --button 2 is the green "zoom" button for all applications --window 1 is always the frontmost window. end tell else tell application "System Preferences" activate set current pane to pane "com.apple.preference.universalaccess" display dialog "UI element scripting is not enabled. Check 'Enable access for assistive devices'" end tell end if end tell
一直很想要这个功能,但是苹果的系统一直没有支持。今天用mac application green button key zoom这几个关键词搜索到了。

2007-05-31 23:30:50
测试
2007-10-24 20:23:12
受教了.谢谢分享..