使用AppleScript执行远程文件夹操作时遇到问题
所以我有一个Applescript来帮助对照片进行适当的命名,以便输入数据,将其分配给一个唯一的ID。因为我们使用的是Mac的,所以这是在Applescript中完成的。这很好,但只适用于一台机器。现在需要的是在多台机器上工作。我想做的是把照片放在我们的服务器上,让客户端机器从那里对文件夹执行操作 我目前遇到的问题是,脚本没有对用户进行身份验证,即使信息正确,也没有运行脚本。我这样做对吗使用AppleScript执行远程文件夹操作时遇到问题,applescript,remote-access,Applescript,Remote Access,所以我有一个Applescript来帮助对照片进行适当的命名,以便输入数据,将其分配给一个唯一的ID。因为我们使用的是Mac的,所以这是在Applescript中完成的。这很好,但只适用于一台机器。现在需要的是在多台机器上工作。我想做的是把照片放在我们的服务器上,让客户端机器从那里对文件夹执行操作 我目前遇到的问题是,脚本没有对用户进行身份验证,即使信息正确,也没有运行脚本。我这样做对吗 tell application "Finder" of machine "eppc://user:pass
tell application "Finder" of machine "eppc://user:password@server.local"
set renameFiles to the selection
set inventoryFiles to every file in folder (((path to documents folder) as text) & "Inventory Photos")
set currentIndex to the count of inventoryFiles
repeat with i from 1 to the count of renameFiles
set currentFile to (item i of renameFiles)
set new_name to ((10000 + currentIndex + i) as text) & ".jpg"
set name of currentFile to "a" & new_name
end repeat
end tell
感谢您提供的任何帮助如果您取出用户名和密码并仅运行例如:告诉应用程序“机器的查找器”eppc://server.local说“你好”。您是否收到密码和用户名提示。此外,这是一种更好的方法,因为用户可以检查save-in-keychain