1

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?

  • 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 Aug 15 '15 at 9:05
  • Stack Overflow or Super User maybe? – aytimothy Aug 15 '15 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 Aug 15 '15 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 Aug 15 '15 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 Aug 15 '15 at 11:13
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.

  • 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 Aug 15 '15 at 10:38
  • 2
    @NoneOfYourBusiness fixed – Ave Aug 15 '15 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 Aug 15 '15 at 11:47
  • @aytimothy is the meaning of great person. – Ave Aug 15 '15 at 11:51
  • 1
    @ardaozkal Welcome to the 1000 club. Also, please don't ask for upvotes. – aytimothy Aug 15 '15 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.