gad*_*tmo 1 string applescript numbers
为什么这个简单的 Applescript 片段不起作用?
\n\nset x to 0\nset thePath to "~/Pictures/party hard/b93-" + x + ".png"\nRun Code Online (Sandbox Code Playgroud)\n\n我收到错误:
\n\nCan\xe2\x80\x99t make "~/Pictures/party hard/b93-" into type number.\nRun Code Online (Sandbox Code Playgroud)\n\n我尝试过很多其他的事情,比如(x as string)。
这么简单,我不明白为什么它不起作用。
\nAppleScript\xe2\x80\x99s 连接运算符是&,而按+字面解释。它会引发错误,因为您的代码正在尝试将字符串和数字相加。
尝试这个:
\n\nset x to 0\nset thePath to "~/Pictures/party hard/b93-" & x & ".png"\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
2010 次 |
| 最近记录: |