Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Detect a string of text in a running program. (http://www.programmingforums.org/showthread.php?t=15539)

Maxmackey Apr 1st, 2008 11:07 PM

Detect a string of text in a running program.
 
Hello, new to the forums and my apologies if this is the wrong place for this ;)

I want to know if this is possible, if a program already exists, or how hard it would be to make such a program, if I need to pay someone to make it.



I am running a full screen game similar to World of Warcraft, if anyone has played it.
I am trying to find a program, that will detect text that is sent to me/displayed on my screen in the game. I would then like the program to make a loud obnoxious noise, once that string of text is detected.


I.E:
"Selected 'X' target"
Program then emits a loud noise.

Jessehk Apr 2nd, 2008 12:03 AM

Re: Detect a string of text in a running program.
 
Well, this could be way off base since I've never played WoW. I do know that WoW can be controlled through a scripting language called Lua.

This might be useful, but I really don't know. http://www.wowwiki.com/Lua

Jimbo Apr 2nd, 2008 12:17 AM

Re: Detect a string of text in a running program.
 
Your program could take a screenshot and then try to OCR some meaning out of it. Probably too much work for an unreliable solution though :P

Maxmackey Apr 2nd, 2008 1:29 AM

Re: Detect a string of text in a running program.
 
Not QUITE what I was looking for but the LUA link did give me some info.

Ive been tooling around with the games files, and have discovered that everything I type is stored in an in game log.

So, theoretically, I suppose the easiest way to make a program like this would be to have a program that opens up the text file, searches for the text, and if it exists to then make the noise.

Anyone know if this is possible?











Heres some example of the text:
[04/01/08 23:27:07] Lothir -> WreckLoose : Quick Major Health V of Purifying [ Casting... ]
[04/01/08 23:27:07] Indestructible Fyakki -> WreckLoose [ Missed ]
[04/01/08 23:27:07] WreckLoose -> Indestructible Fyakki : Cloak of Thorns IV [ 137 pierce ]




So lets say if the program detected:
Indestructible Fyakki -> WreckLoose [ Missed ]
I would want it to make a sound.

Jabo Apr 2nd, 2008 6:17 AM

Re: Detect a string of text in a running program.
 
Sounds like you're wanting to make a gamebot, which is most likely against the game TOS

peaceofpi Apr 2nd, 2008 11:00 AM

Re: Detect a string of text in a running program.
 
Quote:

Originally Posted by Maxmackey (Post 143373)
So, theoretically, I suppose the easiest way to make a program like this would be to have a program that opens up the text file, searches for the text, and if it exists to then make the noise.

Anyone know if this is possible?

http://www.cplusplus.com/doc/tutorial/files.html

Maxmackey Apr 2nd, 2008 12:20 PM

Re: Detect a string of text in a running program.
 
I am NOT making a game bot.

The program will be used to notify me when someone is sending me a group message.


If you want details:
Someone in my group will be saying "Selected Valkor the Impaler" I then wish to have the program notify me, either if im asleep or just alt+tabbed, so I can then start the game and join them.

PhilBon Apr 2nd, 2008 6:39 PM

Re: Detect a string of text in a running program.
 
I would make sure that you make a copy of the file before opening it and reading it. There are some programs that if they try to reopen an open file it will fail. Make sure you sure some kind of error handling.

Watchman May 3rd, 2008 4:49 PM

Re: Detect a string of text in a running program.
 
You have been reported - again. Have a nice day.


All times are GMT -5. The time now is 12:37 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC