Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29

Thread: DTM failed

  1. #26
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Sorry that I got both of you into this fight(:

    I will now end this thread with one more question:
    Is this how I can typesend a range of numbers?

    SCAR Code:
    Procedure typecrap;
    var
    numbai:integer;
    numbas:string;
    begin
    numbai:=27+random(300000);
    numbas:=numbai;
    typesend(numbas);
    end;
    Last edited by Main; 09-04-2009 at 09:55 AM.
    Oh Hai Dar

  2. #27
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not exactly, do:

    SCAR Code:
    Procedure typecrap;
    begin
      TypeSend(IntToStr(RandomRange(27, 4000)));
    end;

    or not sure if that really wroks

    procedure typecrap;
    var
      rnum: integer;
    begin
      rnum := RandomRange(27, 8000);
      TypSend(IntToStr(Rnum));
    end;

    Basically, your taking a randomrange of integers then converting it to a string so TypeSend can type it. IDK if first one works or compiles, lol, but the second one should work.

  3. #28
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Kk, Just finished installing msn, adding you now.
    Oh Hai Dar

  4. #29
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Junkj View Post
    SCAR Code:
    procedure lookforcolor;
    var x, y, color:integer;
    Begin
      Color:=Bitmapfromstring('1337');
      repeat
        Findbitmap(color, x, y)
     until(findbitmap(color,x,y)
    writeln('found') //or status
    terminatescript;

    Pretty sure it is. Add a
    Code:
    writeln('')
    And a terminatescript; so it stops when its found, knowing it works. or use status('').
    That wouldn't be the smartest way to do it, as you're searching for the bitmap twice, which in turn will be slower. Try:
    SCAR Code:
    while(not(FindBitmap(color, x, y))) do
      Null;
    Quote Originally Posted by Smarter Child View Post
    Not at all, do:

    SCAR Code:
    repeat
      if findbitmap(BLAH)then
      mmouse(x, y, 2, 2);
    until(IsUpText('WTF'));//Child's play lol
    if IsupText('WTF')then
    begin
    writeln('yay it worked');
    result := true;
    end;

    Something like that, sorry for standards wrote in comment box
    That is correct in what Main_FTW wants...
    Quote Originally Posted by Junkj View Post
    Using some vars...
    SCAR Code:
    Procedure lookforbitmap;
    var found :integer;
    begin
    repeat
    If (Findbitmaptolerance(somebitmap, somex, somey, sometolerance)) then
    found:=found+1
    until(false)
    end;
    And smarter btw you dont need
    Code:
    until(poop)
    if(poop)//this
    As until already will find it.
    ...except Junkj is correct. You will not need the if(poop) statement, since it'll break the loop once it is found.
    Quote Originally Posted by Junkj View Post
    No it wouldn't, if it finds the bitmap, then it will increase by 1 and keep repeating to find the bitmap, and if it finds it again it increase the var by 1.
    It'll keep increasing it to the maximum value it can go. After that, it'll just return 0 (a.k.a False)

    And guys, please, the arguing ends here.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

Page 2 of 2 FirstFirst 12

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
  •