-1
関連するコードは次のとおりです。I 最後に "repeat"ブロックでエラーが発生しています。プログラムの実行に使用されるコマンドラインは、 "osascript Export¥Library.scpt/Users/bryandunphy/Development/iTunesLibraryConsolidator Testing.xml"です。Export Library.scpt:実行エラー:変数ndxが定義されていません。 (-2753)であり、2つの認識された変数と同じ "ローカル"行にある
on run (clp)
if clp's length is not 2 then error "Incorrect Parameters"
local destination, libraryName, ndx
set destination to clp's item 1
set libraryName to clp's item 2
menuClick({"iTunes", "File", "Library", "Export Library…"})
tell application "System Events" to set the value of text field "Save As:" of window "iTunes" of process "iTunes" to libraryName
tell pop up button 1 of group 1 of window "iTunes" of process "iTunes" of application "System Events" to click
ndx = 1
repeat
if the title of menu item ndx is "" then
select menu item (ndx - 1)
exit repeat
else
ndx = ndx + 1
end if
end repeat
my switchDir(destination, "iTunes", "iTunes", true, false)
tell button "Save" of window "iTunes" to click
return (destination & "/" & libraryName & ".xml")
end run
内でなければならないシステム内でなければなりません...ボタン1をポップアップ教え行の後にさらにすべてのもの」に拡大してくださいイベントはブロックを示します。 **正確に***どの行が "tellブロック"の中にある必要がありますか? –
実際には 'menu item'と' tell button "という行を含む2行が" ... " – vadian