Results 1 to 7 of 7

Thread: quick question

  1. #1
    Join Date
    Apr 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default quick question

    is there a way to have scar look in a co-ord box, and return an integer of what the box has, like a bitmap?

    i want my program to be able to look at an area, and know if text has changed in it, but it isnt runescape text.

    the text is : 21:55 You have gained a level.

    a timer, displays current time, and says i have gained a level.

    i want my program to basically say

    if ({that text is different than it was last time this was checked}) then
    begin
    //do stuff. i can handle this part
    end;

    i just dont know how to make it read the text and look for a change.

    thanks in advance!

  2. #2
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Should be as simple as:
    SCAR Code:
    Text := CountColor(ColourOfText, X1, Y1, X2, Y2);
    if(Text <> CountColor(ColourOfText, X1, Y1, X2, Y2))then
    //dostuff

  3. #3
    Join Date
    Apr 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    colorcount will work, when the color of the characters, and the number of characters is the same?

  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if they're less than or greater than it will work.. I think..

  5. #5
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Use a between function and GetDebugText for this .

  6. #6
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by dudeperson View Post
    colorcount will work, when the color of the characters, and the number of characters is the same?
    Yes, it will return true if that happens.

    Quote Originally Posted by NaumanAkhlaQ View Post
    Use a between function and GetDebugText for this .
    I think he wanted to do this for a game, so I don't think DebugText would do it.

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

    Default

    is this what ur lookin for?

    SCAR Code:
    Program New;
    {.include SRL/SRL.scar}
    begin
      SetupSRL;
      WriteLn(+TheTime+' You have gained a level.');
    end.

    Or is it...

    SCAR Code:
    Program New;
    {.include SRL/SRL.scar}
    Var
      Time : String;
    begin
      SetupSRL;
      Time := TheTime;           // Used For Testin
      If TheTime = Time Then     // Replace Time With '(WhateverTime)' EG   If TheTime = '04:50:09 PM' Then     ECT
        WriteLn(+TheTime+' You have gained a level.');
    end.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Just a quick question? Did I say quick?
    By SeanJohn in forum OSR Help
    Replies: 3
    Last Post: 01-28-2009, 12:03 AM
  2. Quick question
    By GinFoxface in forum OSR Help
    Replies: 2
    Last Post: 04-07-2007, 04:25 AM
  3. Quick Question
    By mage of begu in forum OSR Help
    Replies: 10
    Last Post: 01-12-2007, 10:48 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
  •