This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var system = require('system'); | |
// Exit in case of wrong parameter count. | |
if (system.args.length !== 3) { | |
console.log('Usage: scriptname targetUrl referrer'); | |
console.log('example: $> phantomjs fake-referrer.phantom.js http://example.com http://referrer.example.com'); | |
phantom.exit(); | |
} | |
// Set the important pieces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Spotify" | |
return player position | |
end tell | |
-- returns 13.37 | |
tell application "Spotify" | |
return "" & player position | |
end tell |