Results 1 to 18 of 18

Thread: I'm starting my first script

  1. #1
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I'm starting my first script

    Just an Auto-Login for starts.

    There was a tutorial on the wiki, and I followed his steps.
    Created one for the new log-in screen though.

    I specified the window (Dragged crosshairs onto runescape)
    And hit run.
    Unfortunately, it threw my mouse in the bottom right corner, and when I tried to move it, it would just move right back there.

    So take a look at the script, and tell me what is faulty with it.

    Please and thanks.


    program New;
    {.include srl/srl.scar}
    Procedure ClickOnExistingUserButton;
    Begin
    Mouse(375, 187,1,1,true)
    Wait(1000+random(2000))
    WriteLn('Clicked Existing User Button')
    end;

    Procedure TypeInUserandPass;
    Begin
    TypeSend('Username') //username here
    wait(1000+Random(2000))
    TypeSend('password') //password here
    end;

    Procedure ClicktoPlay;
    Begin
    Mouse(655, -14750529,1,1,true)
    wait(2000+Random(3000))
    end;

    begin
    SetupSRL;
    ActivateClient;
    ClickOnExistingUserButton;
    TypeInUserandPass;
    ClicktoPlay;
    end.
    Last edited by winteraven; 07-04-2009 at 06:46 AM.

  2. #2
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Mouse(655, -14750529,1,1,true)

    thats not right. -14750529

    would be at the bottom right corner.
    I do visit every 2-6 months

  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  4. #4
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Shuttleu, thanks sooo much.
    Completely blanked on that.

    ZaSz, I changed the coordinates.
    Still didn't work.
    Mouse is still trapped in bottom right hand corner.

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    what SCAR and SRL versions are you using?
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  6. #6
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Show your new script.
    I do visit every 2-6 months

  7. #7
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    program New;
    {.include srl/srl.scar}
    Procedure ClickOnExistingUserButton;
    Begin
    Mouse(375, 187,1,1,true)
    Wait(1000+random(2000))
    WriteLn('Clicked Existing User Button')
    end;

    Procedure TypeInUserandPass;
    Begin
    TypeSend('username') //username here
    wait(1000+Random(2000))
    TypeSend('password') //password here
    end;

    Procedure ClicktoPlay;
    Begin
    Mouse(384, 430,1,1,true)
    wait(2000+Random(3000))
    end;

    begin
    SetupSRL;
    ActivateClient;
    ClickOnExistingUserButton;
    TypeInUserandPass;
    ClicktoPlay;
    end.

  8. #8
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    make sure before getting points to use, make sure the crosshair was selected on the client, or you may be getting bad points.
    I do visit every 2-6 months

  9. #9
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    or maby its just his srl/ scar, like he has the wrong one
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  10. #10
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have version 3.20 scar, I think.

  11. #11
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    To start off with, if you're gonna include SRL into your script, why not take use of it's limitless library of functions that are already done for you, such as the log in.

    For the second thing, he asked you if your SRL is up to date, not the SCAR, those are two completely different things.

    SCAR is what runs the scripts, SRL is the library to make your life easier making scripts for SCAR.

  12. #12
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Feroc1ty View Post
    To start off with, if you're gonna include SRL into your script, why not take use of it's limitless library of functions that are already done for you, such as the log in.

    For the second thing, he asked you if your SRL is up to date, not the SCAR, those are two completely different things.

    SCAR is what runs the scripts, SRL is the library to make your life easier making scripts for SCAR.
    To start my post off. If he says he is just trying to learn scar by making an auto log in, why not let him learn scar by doing so? How can he learn to script by just copying down functions? Maybe if he was making a totally different script, it would be good to use srl's functions.

    For the second thing :
    Quote Originally Posted by akwardsaw View Post
    or maby its just his srl/scar, like he has the wrong one
    He answered part of the question, so plz don't make him sound like an idiot who can't tell the difference. Plus i really don't think srl isn't the problem. If he has the latest scar. Then he would at least have an srl thats from within the last year, which wouldn't become outdated.

    I think I get a little cranky at night , but I think I got legit arguments, cause it sounded like you had an all knowing attitude.
    I do visit every 2-6 months

  13. #13
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Feroc1ty, it is my first script.
    I have no idea on how this stuff works.
    You may be "all knowing" as you claim to be, but I, most certainly, am not.

    ZaSz, I double checked on the coordinates just now.
    They seem to be right.
    Any other ideas?

  14. #14
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    run this and tell me what it says in the debug box
    then we can figure out exactly where its going wrong
    SCAR Code:
    program New;
    {.include srl/srl.scar}
    Procedure ClickOnExistingUserButton;
    Begin
    writeln('debug4');
    Mouse(375, 187,1,1,true)
    writeln('debug5');
    Wait(1000+random(2000))
    writeln('debug6');
    WriteLn('Clicked Existing User Button')
    end;

    Procedure TypeInUserandPass;
    Begin
    writeln('debug8');
    TypeSend('username') //username here
    writeln('debug9');
    wait(1000+Random(2000))
    writeln('debug10');
    TypeSend('password') //password here
    end;

    Procedure ClicktoPlay;
    Begin
    writeln('debug12');
    Mouse(384, 430,1,1,true)
    writeln('debug13');
    wait(2000+Random(3000))
    end;

    begin
    writeln('debug1');
    SetupSRL;
    writeln('debug2');
    ActivateClient;
    writeln('debug3');
    ClickOnExistingUserButton;
    writeln('debug7');
    TypeInUserandPass;
    writeln('debug11');
    ClicktoPlay;
    writeln('debug14');
    end.

    ~shut

  15. #15
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    My first script was something that just pressed START, then opened Firefox and then gets it onto Runescape by typing into the URL bar. Try something like that.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  16. #16
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    orr you can look through my beginers tut, it has instructions on how to make a better/ more complex way to make an auto login(if shuttle's idea doesnt work), just for more practice and knoledge
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  17. #17
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Shuttleu,
    Successfully compiled (7142 ms)
    debug1
    SRL Compiled in 93 msec
    debug2
    debug3
    debug4
    debug5
    debug6
    Clicked Existing User Button
    debug7
    debug8
    debug9
    debug10
    debug11
    debug12
    Successfully executed
    Unfortunately, I think runescape lagged a lot, and it typed password where the username was, and trapped my mouse in the bottom right hand corner.

    R1ch, maybe I'll do that. Or I'll add the auto-login to that, so I can have a good first script, and a good understanding of how to make one.

    Akward, could you post the link here or PM it to me? That'd be great, thanks.

  18. #18
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    the link is in my siggy, called scripting basics or w/e
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •