全スレッド > Steam 掲示板 > Help and Tips > トピックの詳細
Autohotkey: Steam ahk_class
I don't have the strongest computer, so I wanted to make a hotkey to close some programs, so I would get that extra needed power for my games.

But I have run into a problem, I can't get steam.exe's ahk_class using window spy, since you can't click on it with window spy.

Initially I just clicked on the steam window with window spy. But when I ran my code, I found out it would only close the steam window, and not the steam.exe process. So basicly, steam was still running.

Now I don't want to taskkill steam, since sometimes it needs to sync with the steam servers. So that's why I'm using winkill, since I can then give it (x) time to sync, and then steam can shut itself down. But if it doesn't manage to do it in (x) amount of time, then steam will get killed. But since I can't get steam's ahk_class, I'm not able to do that.

So my question is: Does anyone know Steam's ahk_class and if so, how did you find out?

I haven't been using autohotkey too much, but I know enough to write a little :)

pidskype:= 0 pidsteam:= 0 gamemode:= 0 appskey & lwin:: if gamemode = 0 { winget, pidskype, pid, ahk_class tSkMainForm >>>>>>>> winget, pidsteam, pid, ahk_class ??STEAM?? ;run taskkill.exe /f /im explorer.exe,, hide winkill, ahk_pid %pidskype%,, 10 winkill, ahk_pid %pidsteam%,, 10 gamemode:= 1 goto, killed } if gamemode = 1 { ;run explorer.exe run "e:\skype\phone\skype.exe" run "d:\steam\steam.exe" gamemode:= 0 } killed: return
Please note that this is unfinished code, and the reason I used taskkill on explorer.exe, was because that was the only way to kill it. Since if you tried to in another way, it would just bring up the close windows screen.

I also commented it out, since it was getting annoying having my taskbar getting killed all the time, while I was working on it
最近の変更はFrozhaxが行いました; 2013年8月3日 6時35分
全スレッド > Steam 掲示板 > Help and Tips > トピックの詳細
投稿日: 2013年8月3日 6時30分
投稿数: 0