AppleScript: How to skip 30/rewind 10 seconds in iTunes?

With the launch of Podcasts for the iOS devices, Apple introduced two buttons on the device to skip 30 seconds (great for skipping advertisements, or Sarah Lane segments in Tech News Today) and to rewind 10 seconds for quick replay of something important that you missed.

Well, iTunes is my desktop app for podcast subscription and management and unfortunately these two buttons don’t exist in iTunes. For this I use two applescripts that I’ve labeled iTunes-Skip-30 and iTunes-Back-10. They sit in my scripts folder and any time I want to use them I just access the scripts from the top menu bar.

-- iTunes Skip 30
tell application "iTunes" to set player position to (player position + 30)
-- iTunes Back 10
tell application "iTunes" to set player position to (player position - 10)

You just need to use your Script Editor and save each of these scripts in your user scripts folder (usually in ~/Library/scripts/) and enable the scrips menu in the Scripts Utility.