How do i get a window id

Ask gaming related questions (AHK v1.1 and older)
kallera
Posts: 17
Joined: 24 Sep 2017, 20:35

How do i get a window id

24 Sep 2017, 20:43

How do I get a window identification?

I am beginning by opening two instances ofthe same game. One is for one character, the other for my second char.

I wat to give different commands to my players (to my windows). I want to send say "1" to the first, "2" to the second. How do i accomplish this? Anyone?

Thanks.

--=kallera=--
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: How do i get a window id

27 Sep 2017, 17:38

You can use https://autohotkey.com/docs/misc/WinTitle.htm to find the window info. In the other subforum https://autohotkey.com/boards/viewtopic.php?f=6&t=3376 you can find tools that can help ID the window too. I personally like to rename the window instead. As far as sending keys that's a basic learning step you should take. I didn't use a tutorial to learn that, but I did read some documentation https://autohotkey.com/docs/commands/Send.htm also you might consider looking into ControlSend if it works for you.
kallera
Posts: 17
Joined: 24 Sep 2017, 20:35

Re: How do i get a window id

28 Sep 2017, 00:42

Thanks.

I have already succeeded in giving my windows their own names. I have spent my days studying - and probably discovering - mysteries like what is ahk_id and what is %x% (the percent sign together with the mystic letter A that seems to refer to a window made the lines extremely hard to read). Now I can already start the work that is to be done and I'm currently looking for a way to perform something like the case-command in C but haven't found any way even to get simple input from the user (=me). Like if i press the tabkey I want to activate the other game window (toggle), if I press 'f' I want to send ''f' to the thus active window etc. and last as default the program flow is to loop to the beginning the whole story. I will most certainly need a lot of help in the process which I expect will take several months, even years. The program will probably never be 'finished' though I expect to have the first version (if it even can be called a 'version') in use this or next week.

But it will be possible to use the results pretty early. I look forward to soon have just a little better gaming (I try to play also).

Thank you for your kind help with this project. I will probably need more help soon when I am trying to write code that programs the part that controls the sending of user input.


Much thanks!

--=kallera=--
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: How do i get a window id

28 Sep 2017, 07:45

Take a look at something like https://autohotkey.com/boards/viewtopic.php?f=6&t=225 it might give you some ideas.
User avatar
Reloaded
Posts: 283
Joined: 25 Aug 2017, 08:48

Re: How do i get a window id

28 Sep 2017, 08:13

Or better you go into your Installation folder from Ahk and there is a Tool Called "WinSpy" use this to get all what you need, [WinTitle, MousePosition, MousPosition Color and much more] just try it :)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: ReyAHK and 45 guests