Skip to content

Instantly share code, notes, and snippets.

#!/usr/sbin/dtrace -C -s
#pragma D option quiet
proc::posix_spawn:exec-success,proc::__mac_execve:exec-success
{
this->isx64=(curproc->p_flag & P_LP64)!=0;
#define SELECT_64_86(x64, x86) (this->isx64 ? (x64) : (x86))
#define GET_POINTER(base, offset) (user_addr_t)SELECT_64_86(*(uint64_t*)((base)+sizeof(uint64_t)*(offset)), *(uint32_t*)((base)+sizeof(uint32_t)*(offset)))
#* Script to record and tag spotify tracks, by Lloyd Moore, modified by Ryan Aslett *)
#(* Make sure you are already recording in Audio Hijack Pro with a session called 'spotifySession' *)
tell application "Spotify"
set currentTrack to (current track)
set trackName to (name of currentTrack)
set trackNumber to (track number of currentTrack)
set trackAlbum to (album of currentTrack)
set discNumber to (disc number of currentTrack)
set albumArtist to (album artist of currentTrack)