Results 1 to 7 of 7

Thread: Help with IsTextAtEx()

  1. #1
    Join Date
    Jul 2008
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with IsTextAtEx()

    Hi,

    I was following this tutorial that was apparently a little outdated. It told me to use the IsTextUp function, but that doesn't exist anymore. I searched the help file and found the IsTextAtEx function. I got it working, but a lot about this function is not clear to me. So, can anyone enlighten me about these items:

    - How to use the Tolerance parameter to specifiy the color tolerance
    - What the MinSpacing and MaxSpacing do
    - How to get the Chars parameter

    I used the constant UpChars for the Chars, but that was more by accident then on purpose I guess I should use the LoadChars2 or LoadCharsromFont2, but how would I know which font to use?

    Cheers,
    Stash.

  2. #2
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    For your uptext problem you also could simpely use
    SCAR Code:
    If (Pos('your uptext', rs_getuptext) <> 0) Then
      WriteLn('Found your uptext!');

  3. #3
    Join Date
    Nov 2007
    Posts
    437
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use IsUpText. There, now you don't have to worry about it.
    If you still want to, use UpChars as the font (don't worry about loading). Tolerance is like sometimes uptext is blue and such, just pick what color you want and use like 15, or just use 255 and don't worry about it.
    MinSpacing and Maxspacing is... umm.. well ive never personally used it so I really can't tell you lol, sorry.

  4. #4
    Join Date
    Jul 2008
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the replies. I tried using IsUpText, but that wouldn't build so I figured the function is obsolete and replaced by IsTextAtEx. If not, what include do I need to use it?

    Stash.

  5. #5
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    The IsUpText function is used like this:

    SCAR Code:
    function FindObjExample: Boolean;
    var
      X, Y: Integer;
    begin
      if FindObj(X, Y, lol, mega lol, MEGA LOLZ!!!!) then
      begin
        MMouse(x, y, 6, 9);
        Wait(150 + Random(175));
        if (IsUpText('fish')) or (IsUpText('tits')) then // checks for text after short wait
        begin
          GetMousePos(X, Y);
          Mouse(X, Y, 0, 0, True);
          Result := True;
        end;
      end;
    end;


    Understand?

  6. #6
    Join Date
    Jul 2008
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the info EvilChicken, that cleared a lot up for me. In the tutorial I was using they used the function like IsUpText(9, 9, color, 'Mine') but it should have been IsTextUp('Mine'). Tried this and it works.

    Stash

  7. #7
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    setupSRL;
    if isuptext('yayzors') then
    begin
      writeln('we found the text!');
    end;
    ~ Metagen

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
  •