Apple 脚本:调整虚拟键盘/KeyboardViewer 的大小和位置
如果 1 中的问题太多,请告诉我,我编辑问题并将其拆分为 3?问题。
我目前正在编写一些苹果脚本并尝试了一些东西。
我想要:
- 打开虚拟键盘(keyboardViewer)
- 调整其
- 大小 位置
- 停用诸如
close
restore
和minimize
之类的控件
我的脚本如下:
应用程序 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
我正在使用 https://github.com/nriley/keyboardViewer 的 KeyboardViewer /usr/bin/
If these are too many questions in 1, please tell me it and I edit the question and split it into 3? question.
I am currently writing some apple scripts and tried some things with it.
I want to:
- open virtual keyboard (keyboardViewer)
- resize it
- position it
- deactivate controls like
close
restore
andminimize
My scripts are these:
App 1:
tell application "System Events"
if not (exists (process "KeyboardViewer")) then
do shell script "/usr/bin/keyboardViewer"
end if
end tell
App 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
I am using the keyboardViewer by https://github.com/nriley/keyboardViewer in /usr/bin/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来我无法编写我的应用程序的脚本。调整大小和定位适用于某些应用程序,但不适用于此应用程序。另外,在 mac os x 中隐藏窗口左上角的控件也是不可能的。
Seems I can not script my application. Resizing and positioning works with some applications but not with this one. Also hiding the controls on the top left of the window in mac os x is not possible.