如何使用打字脚本绕过粘贴块(在 Mac 上)
我需要使用 Microsoft 的远程桌面连接通过 RDC 进入受限使用系统,并且我有一台 Mac。在Windows系统上,我不允许复制(合理的,以保护机密数据)或粘贴,这是不合理的,因为我经常会从其他地方获得一些我希望在系统上拥有的代码。
然而,我显然被允许打字。我的问题是,这种情况的最佳做法是什么?
我的猜测:我可以让 AppleScript 在使用键盘快捷键后“输入”剪贴板上的所有内容吗?
I need to RDC into a restricted-use system using Microsoft's Remote Desktop Connection, and I have a Mac. On the Windows system, I am not allowed to copy (reasonable, to protect confidential data) nor to paste, which is not reasonable, as I often would have some piece code from elsewhere that I would love to have on the system.
However, I am obviously allowed to type. My questions is, what is the best practice for such a situation?
My guess: Could I have an AppleScript "typing" everything on the clipboard after using a keyboard shortcut?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的问题很笼统,希望我理解正确。可以使用 Applescript 完成以下操作。
上面显示了两件事:设置剪贴板值和发送击键。它们都必须根据您的具体情况进行修改。
要在键盘快捷键上自动运行脚本,您有两种选择:使用第三方实用程序(例如 BetterTouchTool)并将脚本分配给快捷键。否则,创建一个包含该脚本的新 Automator 服务,并在系统偏好设置中为其分配一个快捷方式。
Your question is pretty general, hopefully I understood correctly. The following can be done with Applescript.
The above shows two things : Setting the clipboard value and sending keystrokes. They would both have to be modified for your exact circumstance.
To automatically run the script on a keyboard shortcut you have two options : Use a third party utility like BetterTouchTool and assign the script to a shortcut. Otherwise create a new Automator Service that includes the script and assign it a shortcut in System Preferences.