Tell application next track inside repeat I am trying to define script to play next on iTunes an Spotify like this.

on run {input, parameters}
    set apps to ("Spotify", "iTunes")
    repeat with thisApp in apps
        tell application thisApp
            next track
        end tell
    end repeat
end run


But on the tell block, I keep getting: "Expected end of line but found identifier."

How can I use application's name as iterable var in this case?
This format will work:

set apps to {"Spotify", "iTunes"}
repeat with thisApp in apps
    if (thisApp's contents = "Spotify") then
        tell application "Spotify" to next track
    else if (thisApp's contents = "iTunes") then
        tell application "iTunes" to next track
    end if
end repeat