本文介绍了与AppleScript的打字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能有我的MAC类型你的AppleScript?
我想是这样的:在编译时,这会的AppleScript键入一个短语,然后preSS进入。是否有任何code模拟按键的pressing?
Is it possible to have my mac type for you with applescript? What I want is this: when compiled, this applescript will type a phrase, then press enter. Is there any code simulating the pressing of keys?
推荐答案
的击键
命令会为你工作。
tell application "System Events" to keystroke "A phrase" & return & "Another phrase"
如果你想有一个特定的应用程序做打字,只是做这些方针的东西:
If you want a specific application to do the typing, just do something along these lines:
tell application "System Events" to tell process "TextEdit" to keystroke "A phrase" & return & "Another phrase"
这篇关于与AppleScript的打字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!