我的操作系统是优胜美地10.10 我试图编辑我拥有的文件夹的现有别名的来源,我写了这个脚本
set theAlias to alias "Users/graphics/Desktop/short"
set newAliasPath to "/Users/graphics/Desktop/testfolder/02"
tell application "Finder"
set original item of file theAlias to file newAliasPath
end tell
但我收到此错误error "File alias Users/graphics/Desktop/short of «script» wasn’t found." number -43
并且我似乎无法正常工作
任何解决方案
答案 0 :(得分:0)
我找到了现在可以使用的解决方案
sh "./gradlew spoon${flavorCombination}"
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "android/build/spoon-output/${flavorCombination}DebugAndroidTest", reportFiles: 'index.html', reportName: 'Spoon'])
答案 1 :(得分:0)
AppleScript alias
说明符不支持POSIX路径。
只需使用本机HFS路径
set desktopFolder to path to desktop as text
set theAlias to alias (desktopFolder & "short:")
set newAliasPath to alias (desktopFolder & "testfolder:02:")
tell application "Finder" to
set original item of theAlias to newAliasPath
end tell