Results 1 to 18 of 18

Thread: Invalid parameters for MouseBox

  1. #1
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Invalid parameters for MouseBox

    Error is on the 3rd line.
    SCAR Code:
    Procedure CreateAcc; //By UNCfan1119
    begin
      MouseBox(324, 212, 400, 212, 1);//Clicks "create account" screen
      Wait(100 + Random(100));
      MouseBox(354, 316, 420, 315, 1);//Clicks on the space for username
      Wait(100 + Random(100));
      WriteLn('Username = ' + Username);
      Wait(1000+random(1000));
    // BEGIN CHECK FOR USERNAME TAKEN

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Procedure CreateAcc; //By UNCfan1119
    begin
    MouseBox(324, 212, 400, 212, 1);//Clicks "create account" screen
    Wait(100 + Random(100));
    MouseBox(354, 316, 420, 315, 1);//Clicks on the space for username
    Wait(100 + Random(100));
    WriteLn('Username = ' + Username);
    Wait(1000+random(1000));

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Mousebox you need a left or right click, and removing the left click (1) gives me a syntax error

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your script works for me?

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  5. #5
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Make sure ur including SRL, there is an overwrite for MouseBox in SRL. SCAR has its own MouseBox that doesn't include right/left click option.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  6. #6
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by uncfan1119 View Post
    Mousebox you need a left or right click, and removing the left click (1) gives me a syntax error
    That's because MouseBox needs 5 parameters.

    For the last parameter:
    1 = left click
    2 = right click
    3 = no click


    I don't see an error in your code there.

    Post the whole script if you're still having problems.

  7. #7
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    I have it included, its {.include/SRL/SRL.scar} right? My whole procedure if that helps.

    SCAR Code:
    Procedure CreateAcc; //By UNCfan1119
    begin
      MouseBox(324, 212, 400, 212,1);//Clicks "create account" screen
      Wait(100 + Random(100));
      MouseBox(354, 316, 420, 315,1);//Clicks on the space for username
      Wait(100 + Random(100));
      WriteLn('Username = ' + Username);
      Wait(1000+random(1000));
    // BEGIN CHECK FOR USERNAME TAKEN
      if (GetColor(503, 321) = 1251528) then
      TerminateScript;//if name is taken, script will stop
      if (GetColor(504, 322) = 3177241) then
    // END CHECK FOR USERNAME TAKEN
      Wait(100+random(100));
      Writeln('Password = ' + Password);
      Wait(100+random(100));
      Writeln('Password = ' + Password);
      Wait(100+random(100));
    // BEGIN DOB (default 01/01/1996)
      MouseBox(361, 454, 366, 457, 1);
      Wait(10+random(10));
      MouseBox(334, 485, 336, 490, 1);
      Wait(100+random(100));
      MouseBox(457, 455, 464, 454, 1);
      Wait(10+random(10));
      MouseBox(392, 487, 409, 490, 1);
      Wait(100+random(100))
      MouseBox(477, 453, 483, 458, 1);
      Wait(10+random(10));
      TypeSend('1996');
      MouseBox(378, 342, 387, 346, 1);
      Wait(100+random(100));
      MouseBox(378, 409, 387, 409);
      Wait(100+random(100));
    //END DOB
      MouseBox(129, 425, 182, 428, 1);//USA
      Wait(100+random(100));
      MouseBox(469, 400, 649, 404, 1);//Clicks continue
      Wait(5000+random(1000));//Wait for slow computers
      MouseBox(77, 360, 85, 366, 1);//I've read privacy policy
      Wait(100+random(100));
      MouseBox(78, 381, 86, 388);//I've read and agree w/Terms
      Wait(9000+random(5000));
      MouseBox(332, 342, 416, 348, 1);//Play Runescape
    end;

  8. #8
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's because you have comma's after the mouse boxes, and you only use 4 parameters. If you don't want to click, put a 3 as the last parameter Example, change:

    SCAR Code:
    MouseBox(378, 409, 387, 409);

    Should be:

    SCAR Code:
    MouseBox(378, 409, 387, 409,3);

    SRL should be included like this also:

    SCAR Code:
    {.include SRL/SRL.scar}

    Again, please post the whole script if still having problems.

  9. #9
    Join Date
    Apr 2008
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you call
    SetupSRL;

  10. #10
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Yeah I had my script edited to test the first post's theory. I do want to click with mouse1.

    I also noticed that I have writeln, instead of sendln? But atm that isn't the error.

    Edit: Yes ape

  11. #11
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    MouseBox(378, 409, 387, 409);

    Line 40 & 49

    Change to..

    SCAR Code:
    MouseBox(378, 409, 387, 409, 1);

    Etc

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  12. #12
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Ty roger, I've overlooked that. But my problem still remains, invalid parameter on line 126.
    SCAR Code:
    MouseBox(324, 212, 400, 212, 1);//Clicks "create account" screen

  13. #13
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    PHP Code:
    Successfully compiled (1551 ms
    SCAR Code:
    Procedure CreateAcc; //By UNCfan1119
    begin
      MouseBox(324, 212, 400, 212,1);//Clicks "create account" screen
      Wait(100 + Random(100));
      MouseBox(354, 316, 420, 315,1);//Clicks on the space for username
      Wait(100 + Random(100));
      WriteLn('Username = ' + Username);
      Wait(1000+random(1000));
    // BEGIN CHECK FOR USERNAME TAKEN
      if (GetColor(503, 321) = 1251528) then
      TerminateScript;//if name is taken, script will stop
      if (GetColor(504, 322) = 3177241) then
    // END CHECK FOR USERNAME TAKEN
      Wait(100+random(100));
      Writeln('Password = ' + Password);
      Wait(100+random(100));
      Writeln('Password = ' + Password);
      Wait(100+random(100));
    // BEGIN DOB (default 01/01/1996)
      MouseBox(361, 454, 366, 457, 1);
      Wait(10+random(10));
      MouseBox(334, 485, 336, 490, 1);
      Wait(100+random(100));
      MouseBox(457, 455, 464, 454, 1);
      Wait(10+random(10));
      MouseBox(392, 487, 409, 490, 1);
      Wait(100+random(100))
      MouseBox(477, 453, 483, 458, 1);
      Wait(10+random(10));
      TypeSend('1996');
      MouseBox(378, 342, 387, 346, 1);
      Wait(100+random(100));
      MouseBox(378, 409, 387, 409,1);
      Wait(100+random(100));
    //END DOB
      MouseBox(129, 425, 182, 428, 1);//USA
      Wait(100+random(100));
      MouseBox(469, 400, 649, 404, 1);//Clicks continue
      Wait(5000+random(1000));//Wait for slow computers
      MouseBox(77, 360, 85, 366, 1);//I've read privacy policy
      Wait(100+random(100));
      MouseBox(78, 381, 86, 388,1);//I've read and agree w/Terms
      Wait(9000+random(5000));
      MouseBox(332, 342, 416, 348, 1);//Play Runescape
    end;

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  14. #14
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    edited out.
    Last edited by uncfan1119; 10-11-2009 at 01:13 AM.

  15. #15
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    As I said change to

    SCAR Code:
    {.include SRL/SRL.scar}

    Then it compiles.

  16. #16
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    oh wow, thanks. Sorry.

  17. #17
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by uncfan1119 View Post
    oh wow, thanks. Sorry.
    No need to apologize. Glad you got it fixed!

    ~JAD

  18. #18
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {.include/SRL/SRL.scar}

    to

    SCAR Code:
    {.include /SRL/SRL.scar}

    /edit ah bit late :P

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

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
  •