为什么当我 "use" 另一个脚本时我的脚本会中断?
Why does my script break when I "use" another script?
我在脚本库中将一个脚本保存为 scpt。当我尝试从此脚本调用处理程序时,我注意到其他语句中断了。有没有办法让两者都起作用? (来自“use”d 脚本和其他语句的处理程序)。示例如下:
yo.scpt
to test(message)
log message
end test
客户端脚本
use yo : script "yo"
set the clipboard to "14" -- fails because of line 1
test(the clipboard)
试试这个……
use yo : script "yo"
use scripting additions
set the clipboard to "14" -- fails because of line 1
yo's test(the clipboard)
我在脚本库中将一个脚本保存为 scpt。当我尝试从此脚本调用处理程序时,我注意到其他语句中断了。有没有办法让两者都起作用? (来自“use”d 脚本和其他语句的处理程序)。示例如下:
yo.scpt
to test(message)
log message
end test
客户端脚本
use yo : script "yo"
set the clipboard to "14" -- fails because of line 1
test(the clipboard)
试试这个……
use yo : script "yo"
use scripting additions
set the clipboard to "14" -- fails because of line 1
yo's test(the clipboard)