Results 1 to 13 of 13

Thread: scar doesnt recognize a picture ? I used the built in feature.

  1. #1
    Join Date
    Jun 2008
    Location
    new hampshire, U.S.A
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    scar doesnt recognize a picture ? I used the built in feature.

    my script is below but scar turns this error:
    Failed when compiling
    Line 49: [Error] (49:38): Type mismatch in script
    It just doesn't make sense. i used the biult in bitmap to sting thing in scar but it made an error and I'm flat confused.
    SCAR Code:
    program Logmein;

    var
    x,y,i:integer;logged:boolean;scr:string;
    procedure checkstate;
        begin
        scr := BitmapFromString(52, 49, 'beNrtmc9rHGUYxyvMobQDIu4mZ' +
           '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' +
           's0qxE5G9t+2LAdYHiIa01UN/kX1DGXpg==');
                                         /|\
                                          |
                                          |
                                      ERROR(before the "pg==")


       if findbitmaptolerancein(scr,x,y,0,0,500,500,50) then
           begin
           writeln('Not logged in...')
           writeln('Performing login')
           logged := 'false'
       end;

    procedure login;
        if logged = 'false' then
            begin
            movemousesmoothex(354 + random(50)-25,260 + random(10)-5,30,100,0,3,2);
            wait(random(50)+10);
            getmousepos(x,y);
            clickmouse(x,y,true);
            wait(random(70)+30);
            if rand = 1 and rand = 1 then
                begin
                movemousesmooth(x+random(100)-50,y+random(100)-50);
            end;
            wait(random(250)+40);
            sendkeyswait(username,30,100);
            movemousesmoothex(351 + random(50)-25,359 + random(10)-5,30,100,0,3,2);
            wait(random(50)+10);
            getmousepos(x,y);
            clickmouse(x,y,true);
            wait(random(70)+30);
            if rand = 1 and rand = 1 then
                begin
                movemousesmooth(x+random(100)-50,y+random(100)-50);
            end;
            wait(random(250)+40);
            sendkeyswait(userpass,30,100);
    end;

    procedure presslogin; // omg!!!!!
        movemousesmoothex(random(54)+351,random(14)+359,100,450,0,0,10);
        getmousepos(x,y);
        clickmouse(x,y,true);
     repeat
        wait(50)
        i := i + 1
        if i = 200 then
           begin
           addtoreport('Login Failed')
           addtoreport('If your computer takes over 10 seconds to login then you have a problem.')
           terminatescript;
        end;
        until(countcolortolerance(0,20,20,110,40,4) > 20 OR i = 200)
        repeat
        wait(100)
        until(countcolortolerance(0,20,20,110,40,4) < 20)
        writeln('Logged in sucsessfully')
    end;

  2. #2
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    SCAR Code:
    if findbitmaptolerancein(scr,x,y,0,0,500,500,50) then
    for that do this
    SCAR Code:
    if findbitmaptolerancein(scr,x,y) then
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  3. #3
    Join Date
    Jun 2008
    Location
    new hampshire, U.S.A
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i changed that but the error isn't that.
    its before that

  4. #4
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    change 'scr' to integer type (rather than string). BitmapFromString returns an integer, which I believe is a pointer to the bitmap in the memory, but not entirely sure, all I know is it should be an integer
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  5. #5
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    actually what what dtm are you trying to make..??

    and change scr to and integer raher than a string

  6. #6
    Join Date
    Jun 2008
    Location
    new hampshire, U.S.A
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    another error???

    Thanks for the bitmap integer help, i was able to debug the script and get it to run but now it wont stop. if i didn't look at the status bar i wouldn't have known it was running, because it hasn't typed or moved the mouse yet.

    it does successfully compile though. i think it has an infinite loop that i cant find, and if the RS window isnt on top it should tell me, not just wait forever. help would be much appreciated. thank you.

  7. #7
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    repeat
        wait(100)
        until(countcolortolerance(0,20,20,110,40,4) < 20)
        writeln('Logged in sucsessfully')
    Right at the bottom - if it counts over 20, then it continues to repeat. Maybe double check it and add a failsafe in the form of a loop counter just to make sure.

    [offtopic]Scaper123 got served a slice of uber irony, with me providing the answer already and his signature showing a hatred of people who don't read the thread and re-post the answer. Edit: And what he said about it is the same as what I said give or take a few words[/offtopic]
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  8. #8
    Join Date
    Jun 2008
    Location
    new hampshire, U.S.A
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    changed those numbers to 60 but still an infinite loop somewhere and i would use text find except the new update could have modified fonts just slightly and caused my script to NEVER work. also... that cant be the problem because the script doesnt even try logging in, must be before that.

  9. #9
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    That is the only possible endless loop. Your other repeat until loop has a counter in it to stop it if it goes on for too long. There may be other problems with your script that stop it logging in, but that's the only infinite loop in it. At what point does it stop doing what it should (eg if it gets all the way to typing in text, then doesn't do anything more then it could be a problem with text inputting or clicking in the username box).
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  10. #10
    Join Date
    Jun 2008
    Location
    new hampshire, U.S.A
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if i move scar to the side and both windows are fully visible, drag cross hair into RS@ and start, it will sometimes jump the mouse to the top mid left of rs2 java window(not the internet window)

  11. #11
    Join Date
    Jun 2008
    Location
    new hampshire, U.S.A
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    my comp has been very strange wit scar(IE., scripts always have errors wen other peeps said they were verified. i have scar 3.15 and SRL from options menu though, and i got the old includes as well.

  12. #12
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SRL respiratory, or srl download..?

    you need respiratory, click the tut link in my signature.

  13. #13
    Join Date
    Jun 2008
    Location
    new hampshire, U.S.A
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I used the SRL repository, moved plugins etc, from tools -> options

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Picture File Extensions In Scar
    By inSane in forum OSR Help
    Replies: 7
    Last Post: 05-21-2007, 08:12 AM
  2. Replies: 33
    Last Post: 04-04-2007, 01:20 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
  •