Jump to content

How to find text in a certain area.


Recommended Posts

Hey, I'm pretty new to this language and I have basically no idea when it comes to what the hell I'm doing. What I'm trying to do is figure out how to write a script that would look in a certain area for a phrase and then execute something based on that. I'm not completely stupid... I understand how to execute it. >.>

$working=1

While $working=1
    WinWaitActive("IM with CrampAlert from RobIsMyMessiah")
        if StringRegExp("Hold on","Hold") then send("If you get this message, my program is working - sorry for the spam.{ENTER}")
        WEnd

That's what I have so far... What I expected it to do is find the phrase 'hold on,' find 'hold,' and spam if those conditions were met, thereby stopping the spam after 'hold on' is off the IM screen. What happens is just continuous spam.

What I'm really ultimately after is something that would just find "hold on" in the newest IM line, send a message, and then wait for the phrase "hold on" to be displayed again. It probably doesn't make much sense to you, but it's for a script I need for a different reason that I intend to switch to code over to - I just figured this explanation would help you guys understand what I wanted better. If you need anything clarified, let me know.

Link to comment
Share on other sites

The first thing that needs clarification is the need to send spam by any method, at any time.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

The first thing that needs clarification is the need to send spam by any method, at any time.

It's going to be used for something that other players can't see in-game, but I was testing it by having it send a message to a friend.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...