Results 1 to 10 of 10

Thread: IsUpText failure?

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

    Default IsUpText failure?

    Okay, I've been working on a script of mine and everything works great. Except that occasionally IsUpText fails to work, for no apparent reason. I've tried adding in more waits, calling it multiple times in a row, and using Nava2's ResetRS procedure.

    Anyone have any ideas as to why it's failing, and/or how to fix it?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, California
    Posts
    276
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try adding this
    SCAR Code:
    Function GetUpTextBlue:String;
    Begin
      Result := Trim(GetTextAtEx(7, 7, 140, upchars, true,
      true, 0, 2, 15066384, 50, True, tr_AllChars));
    End;

    Function IsUpTextBlue(Text: String): Boolean;
    Begin
      Result := (Pos(Text, GetUpTextBlue) <> 0)
    End;
    And when you using IsUpText use it in combination like this.
    SCAR Code:
    If(IsUpText('Mine'))or(IsUpTextBlue('Mine'))then

    Hope this helps.

    -The_Shermanator
    Current Project: All In 1 Falador Script - 20% DONE

  3. #3
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The_Shermanator View Post
    SCAR Code:
    If(IsUpText('Mine'))or(IsUpTextBlue('Mine'))then
    Wouldn't it be?
    SCAR Code:
    If(IsUpText('ine'))or(IsUpTextBlue('ine'))then

  4. #4
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    it can be both, using capital letters just slows it down (makes it harder for scar to process/read), so faster would yes be 'ine' instead of 'Mine'
    “Ignorance, the root and the stem of every evil.”

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

    Default

    Quote Originally Posted by The_Shermanator View Post
    Try adding this
    SCAR Code:
    Function GetUpTextBlue:String;
    Begin
      Result := Trim(GetTextAtEx(7, 7, 140, upchars, true,
      true, 0, 2, 15066384, 50, True, tr_AllChars));
    End;

    Function IsUpTextBlue(Text: String): Boolean;
    Begin
      Result := (Pos(Text, GetUpTextBlue) <> 0)
    End;
    And when you using IsUpText use it in combination like this.
    SCAR Code:
    If(IsUpText('Mine'))or(IsUpTextBlue('Mine'))then

    Hope this helps.

    -The_Shermanator
    Thanks. It still fails from time to time, but it seems to be failing much less. Now, are those your functions or should I be crediting someone else?

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, California
    Posts
    276
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    By Wizzup and edited by me.
    Current Project: All In 1 Falador Script - 20% DONE

  7. #7
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You need a Wait, between Mouse movement and IsUpText. Otherwise it will fails.

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

    Default

    Quote Originally Posted by N1ke! View Post
    You need a Wait, between Mouse movement and IsUpText. Otherwise it will fails.
    I already have those, as indicated in my first post:
    Quote Originally Posted by senrath View Post
    I've tried adding in more waits
    And it doesn't always fail. It's really random about when it decides to. And the uptext is clearly visible when it fails to register it.

  9. #9
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    The color of the uptext is affected by the background color behind it. If you have a lot of color bleeding through, it can cause IsUpText to fail. And if the background colors are changing, it can look like it's failing randomly, but it might not be random at all.

    When I run into a problem like that I usually make a DTM of the uptext. DTMs work great for uptext because you can give them color tolerance and position tolerance.


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

    Default

    Well, I don't think the background colors are changing that much, since there is no movement in the script, but I'll give the DTM thing a try. Thanks.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. IsUpText Help
    By Electron Man in forum OSR Help
    Replies: 4
    Last Post: 11-15-2007, 11:03 PM

Posting Permissions

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