take window information

Ask gaming related questions
imnewtoahk
Posts: 4
Joined: 07 May 2024, 06:05

take window information

07 May 2024, 06:09

i want to make as script that detects when in a game chat(roblox) a certian message with a number is recieved and press a key (the number in chat) times. i have tried windowspy but it doesnt display the text not in windowed not in fullscreen mode.


[Mod action: Moved topic to the “Gaming” section.]
User avatar
boiler
Posts: 17184
Joined: 21 Dec 2014, 02:44

Re: take window information

07 May 2024, 07:03

What you should be checking with Window Spy is whether the chat area of the window has a ClassNN control name. If it does, then try getting the text from that control using ControlGetText.
imnewtoahk
Posts: 4
Joined: 07 May 2024, 06:05

Re: take window information

07 May 2024, 17:56

boiler wrote:
07 May 2024, 07:03
What you should be checking with Window Spy is whether the chat area of the window has a ClassNN control name. If it does, then try getting the text from that control using ControlGetText.
if i hover over the chatbox with my mouse nothing changes over the whole game screen it says ahk_class WINDOWSCLIENT so is that what i have to use with controlgettext? if so, how do i type it.\
User avatar
boiler
Posts: 17184
Joined: 21 Dec 2014, 02:44

Re: take window information

07 May 2024, 22:22

No, that means ControlGetText won’t work because they’re not using standard Windows controls, which isn’t surprising for a game window.
imnewtoahk
Posts: 4
Joined: 07 May 2024, 06:05

Re: take window information

08 May 2024, 02:47

boiler wrote:
07 May 2024, 22:22
No, that means ControlGetText won’t work because they’re not using standard Windows controls, which isn’t surprising for a game window.
Ok judging by your amount of posts, and that you’re a moderator
I do t think I have to ask anyone else but is there any alternative way that I can do it?
User avatar
boiler
Posts: 17184
Joined: 21 Dec 2014, 02:44

Re: take window information

08 May 2024, 03:06

You could try using UIA, although I doubt it will work for a game’s chat window. If there is a log file the game keeps on your machine that includes chat history, you could monitor that. As a last resort, you might have to use OCR. There are several OCR libraries on the forum.

I suppose since you are looking for a certain message that there is a possibility that using ImageSearch to find an image of that message could work.
imnewtoahk
Posts: 4
Joined: 07 May 2024, 06:05

Re: take window information

08 May 2024, 04:31

boiler wrote:
08 May 2024, 03:06
You could try using UIA, although I doubt it will work for a game’s chat window. If there is a log file the game keeps on your machine that includes chat history, you could monitor that. As a last resort, you might have to use OCR. There are several OCR libraries on the forum.

I suppose since you are looking for a certain message that there is a possibility that using ImageSearch to find an image of that message could work.
Okay thanks and more specific, I need to detect when someone donates an ingame currency to me which shows up in the chat and I need the script to jump the amount of currency donated times so if someone donates 5 I need the script to jump 5 times. An image will not work because I need the script to know what number comes after the message.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 5 guests