Applescript Export Library.scpt:执行错误:Can’;t集&xAB;类valL和#xBB;的«;txtf和xBB类;窗口1中的1到;测试”;。(-10006)

Applescript Export Library.scpt:执行错误:Can’;t集&xAB;类valL和#xBB;的«;txtf和xBB类;窗口1中的1到;测试”;。(-10006),applescript,Applescript,通过“osascript Export\Library.scpt/Users/bryandunphy/Development/iTunesLibraryConsolidator testing”调用脚本 错误发生在最后一行 以下是相关代码: on run (clp) if clp's length is not 2 then error "Incorrect Parameters" local destination, libraryName set destinatio

通过“osascript Export\Library.scpt/Users/bryandunphy/Development/iTunesLibraryConsolidator testing”调用脚本

错误发生在最后一行

以下是相关代码:

on run (clp)
    if clp's length is not 2 then error "Incorrect Parameters"
    local destination, libraryName
    set destination to clp's item 1
    set libraryName to clp's item 2
    menuClick({"iTunes", "File", "Library", "Export Library…"})
    set the value of the front window's text field 1 to libraryName

此脚本使用macOS Sierra与iTunes 12.5.5.5配合使用:

tell application "System Events" to set value of text field "Save As:" of window "iTunes" of application process "iTunes" to "yourNewLibraryName"
或者,将其调整为您的变量:

tell application "System Events" to set value of text field "Save As:" of window "iTunes" of application process "iTunes" to libraryName
顺便说一下,您也可以使用
文本字段1


这对你有用吗?

是的,很好,我正在用iTunes 12.5.5暂停运行EL Capitan