2017-01-30 4 views
0

スクリプトは "osascript Export \ Library.scpt/Users/bryandunphy/Development/iTunesLibraryConsolidatorのテスト"で呼び出されます。Export Library.scpt:実行エラー:ウィンドウ1の«class txtf»1の«class valL»を "testing"に設定できません。 (-10006)

エラーは最終行で発生します。ここで

関連するコードです:

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 

答えて

0

このスクリプトは、MacOSのシエラ使って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 

ところで、text field 1も使用できます。

これは機能しますか?

+0

はい、完全に私はEL CapitanをiTunes 12.5.5で動作させています –

関連する問題