Jump to content

Steam workflow for launching and activating games


Recommended Posts

I've taken my Alfred 1 Steam extension and made a workflow for all you gamers.  The workflow does a number of things.  Start off by giving it your steam username.  It will then retrieve your game library from the Steam Community website.  Now you can launch games just by entering "steam [gamename]" or selecting it from the list.  I've got about 300 games and while the initial load takes a few seconds (~6) subsequent lookups aren't so bad.  I am caching the data for 12 hours, but you can use "steamclean" to fetch new data on the next "steam" command.

 

If you don't enter a game name (or you enter an activation code or have one on the clipboard) you can use the "Steam Activator" action to have it automagically walk through the activation of your new code.

 

If, for any reason, you need to reset your Steam username, just do "steamclean reset".

 

Download

 

steamenter.jpg

steam1.jpg

steam2.jpg

steamclean.jpg

Link to comment
  • 3 months later...

Awesome workflow, especially the activator! THANK YOU! 

 

The search is pretty slow at times for me and I sometimes have to reset it it or it just says "Doing stuff". Any chance it could be sped up?

 

And one feature request: it would be useful if there were keywords to search by filters, like just installed games, or just mac games. 

Link to comment

 

 

The search is pretty slow at times for me and I sometimes have to reset it it or it just says "Doing stuff". Any chance it could be sped up?

 

Something I've definitely thought about.  The slowness is due to a number of factors: Size of your game list, implementation in AppleScript (which seems slow to handle XML), internet connectivity, etc.  One of these (AppleScript) can likely be dealt with, but I need to do some testing on best possible implementations.

 

If it sticks at "Doing stuff" it's likely that the XML output from steam community barfed and returned an empty list.  This appears to happen from time to time and I never built in validation to ignore or retry if that did happen.

 

 

 

And one feature request: it would be useful if there were keywords to search by filters, like just installed games, or just mac games.

 

I don't know of any way to do this today.  I've looked into how games are stored on your local hard drive, but right now even offering that filtering would slow things down a lot.  Just Mac games doesn't seem possible to be honest, but definitely something I've very interested in figuring out a way to do.  Steam doesn't appear to offer an easy way to do this when retrieving your game list, so it would require an extra lookup for every game in your list and some serious HTML manipulation.  So, I've left that out, we'll see how things go.

 

Steam does have a newer API that may be usable, but would require OAuth and a potentially a complete re-write.  May still be worth it if it offers better performance or more information.

Link to comment
  • 1 year later...

I've done some pretty major updates to this workflow.  It's been completely rewritten (mostly in python) and now can detect installed games (in the default Steam Library Folder), if a game is available for OSX, and if the "game" is actually DLC.  Additionally it now defaults to only showing you games available for OSX, but can be restricted w/in alfred to only show installed games (use -i)

 

It also now grabs the Steam thumbnail, resizes it to make it fit within Alfred and makes that available too.  So, looks prettier, works better, and more options, what's not to love?

 

Grab it of Packal: http://www.packal.org/workflow/steam

Edited by tresni
Link to comment

I have only been able to use the activator. The lister doesn't work for me. It always gives zero items in the list which defaults to the default search. You should catch that and give a proper message.

 

I do not have as many games as you, but I keep mine on an external drive. I opened the script.py file and change the default library location to my external drive. It now reads:

 

DEFAULT_STEAM_LIBRARY = "/Volumes/External/SteamLibrary/steamapps/"

 

But, it still will not get my games.

Link to comment

DEFAULT_STEAM_LIBRARY is only used to attempt to detect the games you have installed.  To get the list of games you own, I actually grab the XML output from steamcommunity.com/id/[your username]/games .  Getting whether something is DLC and/or OSX compatible is done by scrapping the Steam store webpages.  I couldn't find an easy way to get the list of games you owned from Steam on your machine.

 

Did you do "steam -u [your-community-username]"?  Example given: I'm tresni on steam community (i.e. http://steamcommunity.com/id/tresni) so I enter (the first time) "steam -u tresni", wait a seconds while it says "Updating Steam library" then just keep typing what you were looking for.  Important note: your community username may be different from your steam login

 

One thing to be careful of, don't backspace into your username.  If you want to get rid of it, highlight and delete all of it.  Otherwise you run the risk of setting your username to a portion of your actual username, and that just won't work ;-)

 

Maybe I should move the activator onto a separate keyword :)  That way when you press enter while entering stuff (like I do on occassion) you don't fire up the activator :)

Link to comment

Gah, I'm a moron.  I forget that not everyone does the same thing as me.  Specifically I need the id from your custom url, this may be different from both your Profile Name and Login name :)

 

Maybe that helps?  I'll make sure that's better messaged..

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...