来自自动机的路径在Applescript中不起作用

来自自动机的路径在Applescript中不起作用,applescript,posix,automator,Applescript,Posix,Automator,我希望有人能帮助我,因为这很可能是一个非常简单的问题-但我已经在网上查找了一天,找不到解决方案: 使用Automator中的Applescript,我在Automator中有以下变量: FolderPath=/Users/alex/16150 文件名=16150 在Applescript中,我执行以下操作: on run {input, parameters} set FileName to (input as string) set FolderPath to (input

我希望有人能帮助我,因为这很可能是一个非常简单的问题-但我已经在网上查找了一天,找不到解决方案: 使用Automator中的Applescript,我在Automator中有以下变量: FolderPath=/Users/alex/16150 文件名=16150

在Applescript中,我执行以下操作:

on run {input, parameters}

    set FileName to (input as string)
    set FolderPath to (input as string)
    set FolderPath1 to (the POSIX path of FolderPath)

    tell application "Terminal"

        activate

        do script "\\copy (SELECT query_to_xml('SELECT....'')) TO '" & FolderPath1 & "/" & FileName & ".xml'"

    end tell
但是,在终端窗口中,我一直看到以下路径:“16150/16150.xml”,这是不正确的。我需要“/Users/alex/16150/16150.xml”


我错过了什么?谢谢,Alex

请记录输入Hi Pat,谢谢您的回复。我不确定您所说的日志输入是什么意思-在Automator/Applescript中哪里可以获得它?在脚本的第二行写“日志输入”。然后将记录var输入的内容。让我们看看那些内容。帕特,谢谢。由于我正在运行这是自动的,我想日志记录是相当有限的…我现在测试它只是在Applescript,希望能得到一个日志文件给你很快。谢谢,亚历克斯,看看这个