gpt4 book ai didi

applescript - 带有新行的击键字符串

转载 作者:行者123 更新时间:2023-12-02 17:36:54 29 4
gpt4 key购买 nike

考虑一下

set cannedResponse to "Hello,
Thanks for your support request!
We'll take a look at the issue and get back to you as fast as possible"

tell application "System Events" to keystroke cannedResponse

它打印文本但没有返回字符。我怎样才能得到它们?

最佳答案

试试这个...

set cannedResponse to "Hello,
Thanks for your support request!
We'll take a look at the issue and get back to you as fast as possible"

set theList to paragraphs of cannedResponse
set listCount to count of theList
repeat with i from 1 to listCount
tell application "System Events"
keystroke item i of theList
if i is not listCount then keystroke return
end tell
end repeat

关于applescript - 带有新行的击键字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25946850/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com