Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables Applescript在计算机之间更改变量名_Variables_Numbers_Applescript - Fatal编程技术网

Variables Applescript在计算机之间更改变量名

Variables Applescript在计算机之间更改变量名,variables,numbers,applescript,Variables,Numbers,Applescript,我遇到了一个非常奇怪的问题,可能是因为我不知道Applescript如何处理变量名。我已经写了一个脚本,在我的电脑上运行良好。它引用了几个程序的字典中的变量,我将在这里使用数字示例,因为它更为人所知。在我的计算机上,以下各项工作正常: tell application "Numbers" activate tell document 1 tell sheet 1 delete table 1 当相同的脚本加载到另一台计算机时,它看起来如下所示: tell application "Number

我遇到了一个非常奇怪的问题,可能是因为我不知道Applescript如何处理变量名。我已经写了一个脚本,在我的电脑上运行良好。它引用了几个程序的字典中的变量,我将在这里使用数字示例,因为它更为人所知。在我的计算机上,以下各项工作正常:

tell application "Numbers"
activate
tell document 1
tell sheet 1
delete table 1
当相同的脚本加载到另一台计算机时,它看起来如下所示:

tell application "Numbers"
activate
tell document 1
tell <<class NmSh>> 1
delete <<class NmTb>> 1
告诉应用程序“数字”
激活
告诉文件1
告诉1
删除1
当然,它找不到


有什么建议吗?文档1和工作表1中会自动出现数字,在我的计算机上使用这些变量名是正确的。

这些是类的名称,而不是变量。当AppleScript无法加载应用程序的脚本术语时,它会显示内部使用的代码,如您所见。
您的问题是AppleScript在第二台计算机上找不到数字应用程序。

另一台计算机是否安装了数字应用程序?谢谢,这很有意义。然而,我99%肯定另一台计算机有数字,100%肯定它有另一个抛出同样错误的应用程序。是否有可能导致Applescript看不到应用程序?它们可能是不同版本的数字。Applescript实现可以也将在不同版本之间进行更改。在第二台计算机上的Applescript编辑器中,尝试使用“文件>打开词典…”和开始编号。