DEV Community

loading...

Discussion on: Automating a Mac using AppleScript

Collapse
rikeshmm profile image
Rikesh Makwana • Edited

Using delay did fix the problem, I couldn't figure what the issue was all this while without this post! 😂😁
Here is the working code snippet!

tell application "Spotify"
    set track1 to name of current track
    next track
    delay 0.5
    set track2 to name of current track
    get track1 & track2
end tell
Thread Thread
lberge17 profile image
Laura Berge Author

Awesome! I'm glad delay fixed it.