ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Trying to create Steam game shortcuts with AHK

(1/2) > >>

nite_monkey:
I ran across a tutorial to create shortcuts that can be pinned to the windows 10 start menu for steam games without using third party apps.
I wanted to automate this process using AutoHotKey, however when I get to the part where the script actually creates the shortcut, it creates a shortcut with a blank file location.
the file location has to be "%windir%\explorer.exe steam://rungameid/1234"
in my script, I am using
--- ---FileCreateShortcut, explorer.exe steam://rungameid/%Sname%, %Gname%.lnk,,,,%IcoLoco% which creates a shortcut with a blank file location.
Is there any way that I can get this to work? I only know how to code in AHK, so switching to a different program language isn't an option for me, because I rarely make apps, so I don't really want to learn a whole new language just for one simple app.
Any help would be greatly appreciated.

nite_monkey:
Never mind, I figured it out.

--- ---FileCreateShortcut, explorer.exe, %Gname%.lnk,,steam://rungameid/%Sname%,,%IcoLoco%I had no clue what the Args option was, so I messed around with it for a bit, and figured out how to get it to work.

IainB:
^^ Well done and thankyou! I had exactly the same need, and you have just shown a useful solution.    :Thmbsup:

nite_monkey:
yeah, it annoyed me that you couldn't pin steam games to the start menu. I pin all my apps on the start menu in labeled groups to keep my desktop organized.
here is the website with the tutorial in case you need it.


--- ---InputBox, Sname, Input Steam Shortcut, Type in the gameid here.
if ErrorLevel
ExitApp
else
MsgBox, Next, select the icon for the shortcut.
FileSelectFile, IcoLoco
if IcoLoco =
ExitApp
else
InputBox, Gname, Input Game Name, Type in the game's name here.
if ErrorLevel
ExitApp
else
FileCreateShortcut, explorer.exe, %Gname%.lnk,,steam://rungameid/%Sname%,,%IcoLoco%and the source code for my completed script for anyone in the same boat as me.

wraith808:
There's also a very simple tool by skwire to do the same.

https://www.donationcoder.com/forum/index.php?topic=26167.msg242767#msg242767

Navigation

[0] Message Index

[#] Next page

Go to full version