Results 1 to 11 of 11

Thread: 2 Line of Code (1 Problem)

  1. #1
    Join Date
    Oct 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default 2 Line of Code (1 Problem)

    Hey its me again, just been reading more about srl scripting and im just trying to get my head around the basics. here is what i am trying to do (this isnt usefull just yet im just using it as an exorsise)

    SCAR Code:
    program TestingMouseMovmentsandClicking;


    Begin
    MoveMouse(541, 187);
    ClickMouse(541, 187, left);

    end.

    Now when i run this with just the "MoveMouse(541, 187);" it moves the mouse over the attack icon. But when i add "ClickMouse(541, 187, left);
    " this it should click on the attack icon, but instead it gives me this error: Line 6: [Error] (6:21): Unknown identifier 'left' in script

    Little bit of help guys?

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    program Testing Mouse Movments and Clicking;
     
     
    Begin
    MoveMouse(541, 187);
    ClickMouse(541, 187, left);
     
    end.

    program Testing Mouse Movments and Clicking;
    You cant have spaces. It should be:
    program TestingMouseMovmentsandClicking;

    SCAR Code:
    Program TestingMouseMovmentsandClicking;
     
    Begin
    MoveMouse(541, 187);
    ClickMouse(541, 187, left);
    End.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    your dont write left/right i believe, its a boolean so you write true/false. so for your left clicking, you write "ClickMouse(541, 187, true);"

  4. #4
    Join Date
    Oct 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    your dont write left/right i believe, its a boolean so you write true/false. so for your left clicking, you write "ClickMouse(541, 187, true);"
    That got rid of the error for me but it isnt clicking on the Co ords

  5. #5
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    A leftclick = True and a Rightclick = False



    SCAR Code:
    program TestingMouseMovmentsandClicking;
     
     
    Begin
    MoveMouse(541, 187);
    ClickMouse(541, 187, True);
     
    end.

    btw you have to use
    MMouse and Mouse

  6. #6
    Join Date
    Oct 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    A leftclick = True and a Rightclick = False



    ScarScript: By Drunkenoldma

    program TestingMouseMovmentsandClicking;


    Begin
    MoveMouse(541, 187);
    ClickMouse(541, 187, True);

    end.


    btw you have to use
    MMouse and Mouse
    Hmmmz When i use True the mouse does nothing but when i use false it right clicks...

  7. #7
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    False right clicks, True left clicks, how can you spot a left click if there is no "object" under it?

  8. #8
    Join Date
    Oct 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    False right clicks, True left clicks, how can you spot a left click if there is no "object" under it?
    What do you mean?

  9. #9
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    False right clicks, True left clicks, how can you spot a left click if there is no "object" under it?
    Exactly was thinking the same thing!

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  10. #10
    Join Date
    Oct 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    By object do you by any chance mean the RS window?

  11. #11
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ...
    SCAR Code:
    begin
      setupsrl;{dont forget this and dont forget to add srl in the script{.include srl/srl.scar} add <-- that after program}
      MMouse(x, y, 0, 0);//use mmouse!!!
      Mouse(x, y, 0, 0, true);//use mouse!!!
    end;
    ~Hermen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Last line read problem
    By AzulDrake in forum OSR Help
    Replies: 2
    Last Post: 02-27-2009, 05:47 PM
  2. How do you code?
    By Wrycu in forum C/C++ Help and Tutorials
    Replies: 17
    Last Post: 10-27-2008, 02:10 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
  •