nested tell geht nicht

K

klauskobald

Neues Mitglied
Thread Starter
Dabei seit
27.06.2013
Beiträge
9
Reaktionspunkte
0
Warum kriege ich einen Error Expected end of line but found “"”.
in diesen Zeilen
tell playlist "Library" of source "Library"
duplicate (every track whose name is nextLine) to dest
end tell

im Kontext dieses Scripts?


AppleScript:
tell application "Music"
    activate
    set dest to playlist "DELETE THIS"
    tell application "Finder"
        set Names to paragraphs of clipboard
        repeat with nextLine in Names
            if length of nextLine is greater than 0 then
            tell playlist "Library" of source "Library"
            duplicate (every track whose name is nextLine) to dest
            end tell
            end if
        end repeat
    end tell   
end tell
 

Anhänge

  • tell.jpg
    tell.jpg
    102,4 KB · Aufrufe: 48
Zuletzt bearbeitet von einem Moderator:
I found it. I have to nest it differently:



AppleScript:
tell application "Finder"


    set c to (the clipboard as text)


    set Names to paragraphs of c


    repeat with nextLine in Names


    --display dialog nextLine


    if length of nextLine is greater than 0 then


    tell application "Music"


    activate


    set dest to playlist "DELETE THIS"


    tell playlist "Library" of source "Library"


    duplicate (every track whose name is nextLine) to dest


    end tell


    end tell


    end if


    end repeat


end tell
 
Zuletzt bearbeitet von einem Moderator:
Zurück
Oben Unten