Results 1 to 5 of 5

Thread: Wait until a string is in the chatbox?

  1. #1
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default Wait until a string is in the chatbox?

    Is there a procedure/function I could use to wait until a specfic string appears in the chatbox? I have tried looking through the functions list but can't find anything. Thanks

  2. #2
    Join Date
    Nov 2011
    Posts
    255
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Simba Code:
    while not(IsChatBoxTextAnyLine('string',clBlack)) do
      sleep(100);
    though you would want a failsafe in there as it could be an endless loop without one

  3. #3
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    are you talking about a line in the chatbox? or like a click to continue?
    i'd just use a getcolor on different points as it'd be fastest

  4. #4
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    I use this to find out if someone is talking to my character when I'm away from the computer.. You can modify it and see if OldLine = 'text here' then.....


    Simba Code:
    Procedure SomeoneTalked;
    var
      I: Integer;
    begin
      FixChat;
      OldLine := TheLine;

      if(LastChatter(TheName))then
      begin
        GetLastChatText(TheLine);
        if OldLine <> TheLine then
        try
          For I:= 0 To 5 do
          begin
            PlaySound('C:\Users\Brandon\Downloads\MSN_Sound.wav');
            wait(150);
          end;
          writeln(TheLine);
        except end;
      end else
      begin
        GetLastChatText(TheLine);
        if OldLine <> TheLine then
        try
          For I:= 0 To 5 do
          begin
            PlaySound('C:\Users\Brandon\Downloads\MSN_Sound.wav');
            wait(150);
          end;
          writeln(TheLine);
        except end;
      end;
    end;
    I am Ggzz..
    Hackintosher

  5. #5
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Quote Originally Posted by [Nathan] View Post
    Simba Code:
    while not(IsChatBoxTextAnyLine('string',clBlack)) do
      sleep(100);
    though you would want a failsafe in there as it could be an endless loop without one
    Hmm I'll try that, thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •