Results 1 to 8 of 8

Thread: Text Finding

  1. #1
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Text Finding

    Im making this auto responder for one of my scripts that finds blue text but I have to do
    SCAR Code:
    if FindBlueChatMessage('level?') or FindBlueChatMessage('Level?') then
    For all messages and stuff. Im wondering how to ignore cases so I can shorten the code and make the auto responding go faster.

  2. #2
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    omit the L?..... evel?

  3. #3
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I forgot to mension that
    SCAR Code:
    if FindBlueChatMessage('level?') or FindBlueChatMessage('Level?') then
    Says the level twice along with all of the other text finding with "or".

    Rouge poser, what happens when I try to make it find the text wc, lol.
    Last edited by TRiLeZ; 06-14-2009 at 12:10 PM.

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can use InChat..

  5. #5
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    right.. inchat, is probably what yorue looking for..

    Dont forget to add a condition to respond... like..
    .

    if not(lastchatter = newchatter) then
    talk;
    ...

    So you will also need to get the current Person talking, and there is a function for that, but i forgot the name of it xD.. just check the text.scar its all in there.

    You dont want to respond to the same person multiple times

  6. #6
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You should try only getting the eighth line (bottom) and then when you respond to it, it is no longer the eighth line .

  7. #7
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    My function that I put together does only read the 8th line, Ill show you.
    SCAR Code:
    function FindBlueChatMessage(ChatMsg: string): Boolean;
    begin
      Result := (Pos(ChatMsg, GetChatBoxText(8, clChat)) > 0);
    end;
    It used to be FindBlackChatMessage then I changed it to find blue.

  8. #8
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Change it to this:
    SCAR Code:
    function FindBlueChatMessage(ChatMsg: string): Boolean;
    begin
      Result := (Pos(Lowercase(ChatMsg), Lowercase(GetChatBoxText(8, clChat)0) > 0);
    end;

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
  •