非常新的应用程序脚本和任何代码以外的VBA一般。
我正在运行下面的代码来调试较大代码块中的一个问题。
如果我通过将行粘贴到终端来运行do shell脚本,我将根据鼠标光标在屏幕上的位置在我的剪贴板上得到一个数值。
如果我试图运行代码本身,那么yCoordinate总是为空的,所以在运行Shell脚本或将变量设置为剪贴板本身时肯定会出现一些问题。
请帮帮我!
-- script test me
-- delay variables
set delayOne to 0.2
set PageDelay to 2
-- start coding below
do shell script "eval $(/usr/libexec/path_helper -s); cliclick p:. | cut -d ',' -f2 | tr -d \"\\n\" | pbcopy"
set yCoordinate to the clipboard
delay delayOne
display dialog "" & yCoordinate发布于 2022-01-11 01:25:20
这最终成为Cliclick道路上的一个问题。M1上的自制软件安装在另一个目录中。如果将路径替换为以下内容,则此代码可以工作。
do shell script "eval /opt/homebrew/bin/cliclick p:. | cut -d ',' -f2 | tr -d \"\\n\" | pbcopy"https://stackoverflow.com/questions/70660259
复制相似问题