A (sort of) automated way to redeem Steam keys on OS X.

#1 Edited by mlarrabee (2888 posts) -

I buy a lot of game bundles. A lot. So many, in fact, that I wrote an Apple script that runs through the Steam redemption automatically. (I don't currently have a decent PC, and many of the games included in these bundles are Mac-compatible anyway, so all of my key redemption is on OS X.)

Paste this code into Applescript Editor and save it as a script, and when you want to redeem a Steam key, copy the key to the clipboard and launch the script. I currently have the script included in my Quicksilver catalog so I can launch the script with only a couple keypresses.

It's not pretty, but it saves me from carpel tunnel.

if application "steam" is running then

tell application "steam"

activate

tell application "System Events" to tell process "steam" to key code 53 --Press ESCAPE to clear any open Steam overlaid windows

delay 0.5

tell application "System Events" to tell process "Steam"

click menu item "Activate a Product on Steam..." of menu "Games" of menu bar 1 --Click through Steam's menu

delay 0.5

tell application "System Events" to tell process "steam" to key code 36 --Press ENTER through first message

delay 0.5

tell application "System Events" to tell process "steam" to key code 36 -- Press ENTER through license agreement

delay 0.5

key down command --Hold COMMAND key

delay 1

tell application "System Events" to tell process "steam" to key code 9 --Press "V," pastes clipboard contents when combined with currently held COMMAND key

delay 1

key up command --Release COMMAND key

delay .5

tell application "System Events" to tell process "steam" to key code 36 --Press ENTER to process Steam key

delay 3

tell application "System Events" to tell process "steam" to key code 53 --Press ESCAPE to close overlaid Steam window, to skip installing

end tell

end tell

end if

if application "steam" is not running then

tell application "steam" to activate --If script is run without Steam open, starts running Steam

end if

This edit will also create new pages on Giant Bomb for:

Beware, you are proposing to add brand new pages to the wiki along with your edits. Make sure this is what you intended. This will likely increase the time it takes for your changes to go live.

Comment and Save

Until you earn 1000 points all your submissions need to be vetted by other Giant Bomb users. This process takes no more than a few hours and we'll send you an email once approved.