Forms 表单填充粘贴然后选项卡重复

Forms 表单填充粘贴然后选项卡重复,forms,tabs,applescript,copy-paste,Forms,Tabs,Applescript,Copy Paste,我正在尝试使用applescript编写一些数据输入脚本 我需要它粘贴,然后标签七次,然后再粘贴。。。。。2700次 虽然我对编程非常陌生,但我至少能够让一些东西工作起来 到目前为止,我所拥有的: set the clipboard to "blah" tell application "blah" activate tell application "System Events" repeat 4 times keystroke "v"

我正在尝试使用applescript编写一些数据输入脚本

我需要它粘贴,然后标签七次,然后再粘贴。。。。。2700次

虽然我对编程非常陌生,但我至少能够让一些东西工作起来

到目前为止,我所拥有的:

set the clipboard to "blah"
tell application "blah"
    activate
    tell application "System Events"
        repeat 4 times
            keystroke "v" using {command down}
            keystroke "                         "
        end repeat
    end tell
end tell
现在,这将粘贴到第一个表单中,然后跳过一个表单并粘贴到下一个表单中。我不知道为什么。所以这只是粘贴到其他形式

有什么帮助吗?

试试:

set the clipboard to "blah"
tell application "blah"
    activate
    tell application "System Events"
        repeat 4 times
            keystroke "v" using {command down}
            delay 1
            repeat 7 times
                keystroke tab
                delay 1
            end repeat
        end repeat
    end tell
end tell

谢谢你的回复。在第一个表单中输入blah,跳转4行,然后粘贴7个blah。粘贴命令只发送4次。我不知道它会怎么粘贴7次。我听说是的,它好像在粘贴标签后被卡住了。调查了几件事。我编辑了答案,将延迟包括在内。另外,如果你提供更多关于你目标应用程序的背景信息,用户可能会提供更好的解决方案。呵呵,是的,这也是我刚才做的。