2

I have a script (.ahk) that I want to run when I launch a game from Steam, but me and many others I know that want this use the Steam UI to launch the game, so making a desktop shortcut is out of the running, and I don't want a script that runs in the background constantly. Is there a way to detect Steam launching a game or tell Steam to start additional programs?

11
  • A batch file that launches your game and the auto hotkey script would be the obvious solution, but since you don't want that, you are out of luck.
    – user28015
    Commented Aug 15, 2015 at 9:05
  • Stack Overflow or Super User maybe?
    – aytimothy
    Commented Aug 15, 2015 at 9:44
  • 1
    1) @aytimothy is right, this isn't the right place to ask. 2) using AHK in VAC-enabled games can get you vac banned [no citation, strangers over internet].
    – ave
    Commented Aug 15, 2015 at 10:15
  • @ardaozkal No, the question is on-topic, the only problem here is that he is already refusing the only possible answer.
    – user28015
    Commented Aug 15, 2015 at 10:37
  • 1
    @ardaozkal I have delivered answers that contain batch scripts before. Simple automation of gaming related tasks is OK I think. But straight up coding help goes on Stack Overflow.
    – user28015
    Commented Aug 15, 2015 at 11:13

1 Answer 1

4

Even though I'm not sure if this question should be asked in Arqade:

XButton2::
IfWinActive, Spotify
{
    MsgBox, The window here is spotify, add your code here, change game up
    return
}
IfWinActive, Idle Master
{
    MsgBox, The window here is idle master, add your code here, change game up
    return
}
IfWinActive, Counter-Strike: Global Offensive
{
    MsgBox, The window here is csgo, add your code here, change game up
    return
}
return

Also be aware that AHK is kind of in a VAC gray-zone, see here for an article I just wrote.

12
  • 1
    It is not a duplicate if it is not on Arqade. Second of all, the first 2 things should not be in an answer, but a comment. The rest of your answer misses the question in total. So I gave you a -1.
    – user28015
    Commented Aug 15, 2015 at 10:38
  • 2
    @NoneOfYourBusiness fixed
    – ave
    Commented Aug 15, 2015 at 10:55
  • Ooh.. This is nice - But a bit of a clusterf*** if you have lots of programs in need of hot-keying.
    – aytimothy
    Commented Aug 15, 2015 at 11:47
  • @aytimothy is the meaning of great person.
    – ave
    Commented Aug 15, 2015 at 11:51
  • 1
    @ardaozkal Welcome to the 1000 club. Also, please don't ask for upvotes.
    – aytimothy
    Commented Aug 15, 2015 at 11:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .