如何在 macOS 中用快捷键打开/关闭讯飞语音输入?

pimgeek2023年07月18日 00:01

  • 提示 1:需要提前安装 cliclick 命令行工具
  • 提示 2: 我使用 Typinator 专业版的 inline script 功能触发这段脚本,可以在语音转文字编辑框内输入 ;; 触发,也许还有其它可行的触发方法
tell application "System Events"
	tell process "讯飞语音输入"
		-- 获取按钮的位置
		set micBtn to position of button 1 of window "讯飞语音输入"
		set xPos to (item 1 of micBtn) + 10
		set yPos to (item 2 of micBtn) + 10
		do shell script "/opt/local/bin/cliclick c:" & xPos & "," & yPos
	end tell
end tell





创建日期: 2023年07月17日 23:39