AppleScript 按键有时会大写字母? [英] AppleScript keystroke sometimes capitalizing letters?

查看:24
本文介绍了AppleScript 按键有时会大写字母?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实际上正在解决我使用了一段时间的 Alfred 工作流程.作者在 2014 年开发了它,它非常简单,所以我不确定我会从他们的论坛中得到多少帮助.基本上,我有这个:

I'm actually troubleshooting and Alfred workflow I've been using for a while. The author developed it in 2014 and it's pretty simple, so I'm not sure I'll get much help from their forums. Basically, I have this:

set chars to count (get the clipboard)
if chars > 500 then
    do shell script "afplay /System/Library/Sounds/Funk.aiff"
else
    tell application "System Events"
        delay 1
        keystroke (get the clipboard)
    end tell
end if

这个想法是它会在我的剪贴板上输入任何内容,这在登录服务器和其他具有安全字段的东西时很有帮助.最近 10.12.2 或 10.12 有什么变化吗?这在几周前工作得很好,但现在它在输出中随机大写字母.

The idea is that it'll type out anything on my clipboard, which is helpful when logging into servers and other things that have secure fields. Has something changed in 10.12.2 or 10.12 in general, recently? This was working just fine a couple of weeks ago, but now it's randomly capitalizing letters in the output.

我已尝试删除除以下内容之外的所有内容,同时更改延迟无效:

I've tried removing everything but the following, along with changing the delay to no avail:

tell application "System Events"
    delay 1
    keystroke (get the clipboard)
end tell

感谢您的帮助.如果这不是合适的地方,我很乐意将其移走,但我认为它与系统无关.我已经在 Automator 中测试过,结果是一样的.

I appreciate any help. If this isn't the right place for this, I'll be glad to move it but I don't believe it to be system related. I've tested this in Automator and the result is the same.

谢谢!

推荐答案

显然这是自 Beta 版以来 10.12.2 的一个已知问题.

这篇关于AppleScript 按键有时会大写字母?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆