2011-11-22 58 views
0

如果這些是太多的問題在1,請告訴我,我編輯問題,並將其拆分爲3?題。蘋果腳本:調整大小和位置虛擬鍵盤/鍵盤查看器

我目前正在寫一些蘋果腳本,並嘗試了一些東西。

我想:

  • 開放式虛擬鍵盤(keyboardViewer)
  • 調整它
  • 位置它
  • 解除管制喜歡closerestoreminimize

我的腳本是這些:

應用1:

tell application "System Events" 
if not (exists (process "KeyboardViewer")) then 
    do shell script "/usr/bin/keyboardViewer" 
end if 
end tell 

應用2:

tell application "System Events" 
if exists (process "KeyboardViewer") then 
    click (process "KeyboardViewer"'s window 1's buttons whose subrole is "AXCloseButton") 
end if 
end tell 

我在/usr/bin/

回答

0

使用keyboardViewer通過https://github.com/nriley/keyboardViewer我似乎無法編寫我的應用程序。調整大小和定位適用於某些應用程序,但不適用於此應用程序。在mac os x中隱藏窗口左上角的控件也是不可能的。