我在一个AppleScript文件中有以下代码,它应该挂载在我的网络上的散列包。运行此脚本会在hdiutil命令上引发一个错误:
try
mount volume "smb://192.168.1.1/sda2"
end try
do shell script "hdiutil attach -mountpoint /Volumes/sda2 timemachine.sparsebundle"我收到的错误是:
hdiutil: attach failed - No such file or directory" number 1在终端中运行shell脚本代码很好,并且脚本构建得很好。有什么想法吗?
发布于 2013-11-20 04:59:47
开始起作用了。我更改了hdiutil命令语法,现在AppleScript不抛出错误。
try
mount volume "smb://192.168.1.1/sda2"
end try
do shell script "hdiutil attach /Volumes/sda2/timemachine.sparsebundle/"不清楚为什么原来的命令仍然在终端中工作,但在AppleScript中失败,但至少现在起作用了。
https://stackoverflow.com/questions/19992756
复制相似问题