Act when certain words detected in Roblox

Ask gaming related questions (AHK v1.1 and older)
firewt
Posts: 7
Joined: 10 May 2023, 20:36

Act when certain words detected in Roblox

Post by firewt » 11 May 2023, 01:52

The script will look at all of words of the application notepad roblox every half second. Close notepad roblox when new letters/words appears but only when it detects new text that does not include "bob" "gilbert" or "jimmy"


[Mod edit: Subjected edited to be descriptive of request.]

[Mod actions: Moved to "Gaming" and changed "notepad" to "Roblox" once it was revealed that the target application is actually Roblox.]
Rohwedder
Posts: 7895
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can someone help me with a script?

Post by Rohwedder » 11 May 2023, 04:16

Hallo,
every ASCII letter does not include "bob", "gilbert" or "jimmy"!
Therefore Notepad should be closed with each new letter?
firewt
Posts: 7
Joined: 10 May 2023, 20:36

Re: Can someone help me with a script?

Post by firewt » 11 May 2023, 14:17

Rohwedder wrote:
11 May 2023, 04:16
Hallo,
every ASCII letter does not include "bob", "gilbert" or "jimmy"!
Therefore Notepad should be closed with each new letter?
Hello,

It should be any new words. If the script detects any new words that appear ANYWHERE on notepad, it should close notepad. The words “bob” “gilbert” and “jimmy” should be ignored, since they will always be on the screen.

Thanks.
Rohwedder
Posts: 7895
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can someone help me with a script?

Post by Rohwedder » 12 May 2023, 08:03

How is word defined?
Are new words only words that did not exist before?
What if old words are missing or old words have changed their place or if punctuation marks change?

I need example texts!
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Can someone help me with a script?

Post by boiler » 12 May 2023, 08:18

@firewt - Please use more descriptive subject lines when creating threads in the future. Pretty much everyone posting a thread in "Ask for Help" is looking for someone to help them with a script. I'll edit the subject on this thread.
RussF
Posts: 1440
Joined: 05 Aug 2021, 06:36

Re: Act when certain words detected in Notepad

Post by RussF » 12 May 2023, 08:36

Forgive me, but am I the only one besides @Rohwedder that finds this request totally ludicrous?

Why, in the first place, do you have Notepad open unless you want to enter text into it? Once you start typing, if anything you type is not “bob” “gilbert” or “jimmy”, you want to close the application? Do you want the file saved first? If so, the resulting file will be

bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy bob gilbert jimmy .

What exactly is the point of this exercise? :roll:

Russ
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Act when certain words detected in Notepad

Post by boiler » 12 May 2023, 10:32

I agree, RussF. It doesn't make sense to me. What is supposed to happen if you start typing "jimmy" but have only typed "j" so far, or even "jim" if we would only count "words" as a string of three letters or more?
firewt
Posts: 7
Joined: 10 May 2023, 20:36

Re: Can someone help me with a script?

Post by firewt » 12 May 2023, 13:33

boiler wrote:
12 May 2023, 08:18
@firewt - Please use more descriptive subject lines when creating threads in the future. Pretty much everyone posting a thread in "Ask for Help" is looking for someone to help them with a script. I'll edit the subject on this thread.
Rohwedder wrote:
12 May 2023, 08:03
How is word defined?
Are new words only words that did not exist before?
What if old words are missing or old words have changed their place or if punctuation marks change?

I need example texts!
Ok so actually this wasn’t intended for notepad, but for a game called roblox. I put it as notepad before because I didn’t know we were allowed to talk about games here or the discord, but now I know that we are able to, at least here on the forum. Basically, when I join a game, my player name will show along with many other words (like the date, the time, name of the server, region of the server, numbers, letters, random names of moves, etc). This is when I join a 1 player server (I am the only one in it).

My goal for this script is for roblox to automatically close anytime a new person joins the game. For this specific game, new players do not show up on the player list on the right side of the game like they usually do on most roblox games (if you play roblox you know, if not no need to worry about it). The only way to check if any new player joins the game is to hit the escape key. Keep in mind that any other player that joins the game AFTER I hit the escape key (when I am currently on the player list at that time) will NOT be shown unless I reupdate the player list (which is done by simply hitting escape twice to close and reopen the player list).

The reason I need this script is because I basically have something very rare in game that I need to keep for several hours to keep it permanently, but unfortunately other players can take it. So, to deal with this, I leave the server and make a new one any time someone joins the server, and I have been doing this manually, but it is going to take a very long time unless I can somehow get this automated.

Also, sometimes my friends join the game and I don’t have to leave because of that, so if theres any way to add another specified exclusions please help me on that.

Also another thing to keep in mind is that the names of players that join the game can be a combination of letters and numbers, multiple letters, or multiple numbers. This is the end goal for the script, but it seems pretty complicated so I do not know if it can actually be made.

Thank you for taking your time to read this and have a great day.
firewt
Posts: 7
Joined: 10 May 2023, 20:36

Re: Can someone help me with a script?

Post by firewt » 12 May 2023, 13:59

Forgot to say one more thing - The player list that shows after hitting escape takes up the entire screen. So when i’m not on the player list, I can see my character and all the things mentioned before, but on the escape player list I can only see my name, other players names if they are in the server, and other things like settings, menu, etc.

[Mod edit: Removed big quote box. No need to keep quoting everything that has been posted, especially your own previous post.]
firewt
Posts: 7
Joined: 10 May 2023, 20:36

Re: Act when certain words detected in Roblox

Post by firewt » 12 May 2023, 15:00

Here is an example of what it shows when someone presses on escape.
Attachments
IMG_2563.png
IMG_2563.png (380.55 KiB) Viewed 1824 times
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Act when certain words detected in Roblox

Post by boiler » 12 May 2023, 15:37

That is a huge difference from Notepad. Notepad has a control that contains readable text. An AHK script can instantly capture whatever text is in it at any time. In that game screen, it's probably not much more than a picture of text, if you want to think of it that way. I'm guessing that text isn't readable in any way other than OCR, and even that could be difficult because of the background -- possibly done on purpose by the Roblox game designers to prevent this exact kind of thing.
firewt
Posts: 7
Joined: 10 May 2023, 20:36

Re: Act when certain words detected in Roblox

Post by firewt » 12 May 2023, 22:05

boiler wrote:
12 May 2023, 15:37
That is a huge difference from Notepad. Notepad has a control that contains readable text. An AHK script can instantly capture whatever text is in it at any time. In that game screen, it's probably not much more than a picture of text, if you want to think of it that way. I'm guessing that text isn't readable in any way other than OCR, and even that could be difficult because of the background -- possibly done on purpose by the Roblox game designers to prevent this exact kind of thing.
A user on reddit told me that it could possibly be done like this (attached image). Is it possible like this that the script could be made through using some sort of method in here?
Attachments
IMG_2567.jpeg
IMG_2567.jpeg (416.74 KiB) Viewed 1790 times
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Act when certain words detected in Roblox

Post by boiler » 13 May 2023, 00:03

No, that's not at all what he said is possible. Those instructions have nothing to do with reading the text. He is just checking for the absence of text to see if "you are not alone". That's a big difference from what you described. You said you are looking for specific names. Those instructions say nothing about recognizing specific letters at all, let alone whole names.
firewt
Posts: 7
Joined: 10 May 2023, 20:36

Re: Act when certain words detected in Roblox

Post by firewt » 13 May 2023, 13:14

boiler wrote:
13 May 2023, 00:03
No, that's not at all what he said is possible. Those instructions have nothing to do with reading the text. He is just checking for the absence of text to see if "you are not alone". That's a big difference from what you described. You said you are looking for specific names. Those instructions
[Mod edit: Added closing quote tag.]

I’m not gonna lie. It doesn’t really matter the method, as long as it gets the job done, which is for me to leave the game when someone joins the game. What I said in that long message was an idea, but if there’s something else that works then i’d use that in a heartbeat.
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Act when certain words detected in Roblox

Post by boiler » 13 May 2023, 13:24

Yes, that’s possible. It’s all in executing the details, which is a lot more than you can probably expect to get through some forum posts. Either you would have to have the knowledge to work through it yourself or get someone who can do it work on it directly.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Act when certain words detected in Roblox

Post by swagfag » 14 May 2023, 06:17

press Esc
PixelGetColor one of the dark grey background pixels of where the topmost "View" button would normally appear
if the color was actually dark grey, bail out of the game

u can do this urself after spending 1 hour writing ahk, assuming u had never done so before
Post Reply

Return to “Gaming Help (v1)”