Macos 是否将文件夹名称附加到applescript中的路径变量?

Macos 是否将文件夹名称附加到applescript中的路径变量?,macos,applescript,Macos,Applescript,如何将这两个变量连接起来以获得文件路径“/Users/Test/Desktop//Myfolder/Hi.txt”?使用连接字符串: set fold to "/Users/Test/Desktop/" set file to "/Myfolder/Hi.txt" 使用以下命令连接字符串: set fold to "/Users/Test/Desktop/" set file to "/Myfolder/Hi.txt" 给你 set the folderPath to "/Users/Tes

如何将这两个变量连接起来以获得文件路径“/Users/Test/Desktop//Myfolder/Hi.txt”?

使用连接字符串:

set fold to "/Users/Test/Desktop/"
set file to "/Myfolder/Hi.txt"
使用以下命令连接字符串:

set fold to "/Users/Test/Desktop/"
set file to "/Myfolder/Hi.txt"
给你

set the folderPath to "/Users/Test/Desktop/"
set the filePath to "/Myfolder/Hi.txt"
set the fullPath to folderPath & filePath
给你

set the folderPath to "/Users/Test/Desktop/"
set the filePath to "/Myfolder/Hi.txt"
set the fullPath to folderPath & filePath

这将返回“/Users/Test/Desktop//Myfolder/Hi.txt”请注意,如果使用此方法,只要去掉其中一个斜杠,就可以找到双斜杠。此返回“/Users/Test/Desktop//Myfolder/Hi.txt”请注意,您不希望使用双斜杠,如果使用此方法,它将起作用。只要您取出其中一个斜杠,您的脚本是否可以用作上下文菜单,并通过简单的单击将文件夹附加到path变量?你能为这个可能非常有用的applescript提供完整的代码吗?你的脚本能被用作上下文菜单并通过简单的点击将文件夹附加到path变量吗?你能提供这个可能非常有用的applescript的完整代码吗?