Run script over ssh

Well, that settles, this is the single greatest feature I. shortcuts.

I just used it to login to my Plex server, run a sqlite3 query, parse it through awk, and pass the list of movies to Siri.

This is going to… I can’t even… I can… EVERYTHING. BEHOLD THE POWER OF THIS FULL FUNCTIONAL BWAHAHAHAHAHAHAH ZOMG THE POWER‼️ THE PO—

Oh, right, sorry. It’s nice, good feature

New Movies

1 Like

I did a thing.

I wrote a shortcut to login to my Mac and change iTunes to the next track, since I cannot control the playback on the computer from my phone or HomePod.

It’s pointless, but it works.

ssh to my Mac and then

Run script Over SSH {host, port, user, pass}
text {
    osascript <<ENDNEXT 
	tell application "iTunes"  
	  set y to "" 
	  if player state is not playing then
	    play
	    set y to name of current track & " by " & artist of current track & ""
		set result to  y
	else
		next track
		set y to name of current track & " by " & artist of current track & ""
		set result to y
	end if
	end tell
ENDNEXT
}
Show Notification {Title: Next Track} {%Run Script over SSH%}

You’ll need to do this one while having local to the Mac to give permission to control iTunes. Obviously, I made a nearly identical script for previous and one to get the name of the song, artist, album, and running time of the current song.