Results 1 to 11 of 11

Thread: PopUp2??

  1. #1
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default PopUp2??

    How can I get it to right click on a shop item, then press Buy-10? The co-ords don't work properly...

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    What do you mean the coords don't work properly? Just repick them. Unless you're talking about actually picking "buy 10". In that case, use the function ChooseOption.

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

    Default

    Ok, I tried this:
    SCAR Code:
    program Script;
    {.include SRL/SRL.scar}
    begin
    activateclient;
    wait(200)
    ChooseOption(94, 131, 'uy 10');
    End.

    It does nothing. I want it to right click those co ords, then choose buy 10.

  4. #4
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try this:

    SCAR Code:
    program Script;
    {.include SRL/SRL.scar}
    begin
    activateclient;
    Mouse(94, 131, 1, 1, False);
    PopUp('Buy 10');
    End.

  5. #5
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It right clicks, then stops with this error:
    SCAR Code:
    [Runtime Error] : Exception: Access violation at address 0064FEA2 in module 'scar.exe'. Read of address 00000000 in line 239 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Text.scar

  6. #6
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    You need to put SetupSRL; as the first thing in your main loop.

  7. #7
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program Script;
    {.include SRL/SRL.scar}

    Procedure BuyItems;
    begin
    Mouse(94, 131, 1, 1, False);
    PopUp('Buy 10');
    end;


    Procedure SetupScript;
    begin
    SetupSRL;
    activateclient;
    End.


    It worked, I just tried creating the main loop, error:
    SCAR Code:
    Failed when compiling
    [Error] (17676:4): Semicolon (';') expected

  8. #8
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program new;
     
    function functionname(functionparamaters);
    begin
      stuff;
    end;

    //main loop
    begin
      functionname;
    end.

    All ends should be end; with semi colon, except the main loop with a period/full stop/dot end.

  9. #9
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You cant end the script like that, try this.

    SCAR Code:
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    program test;
      {.include SRL/SRL.scar}

    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    procedure BuyItems;
      begin
        Mouse(94, 131, 1, 1, False);
        PopUp('Buy 10');
      end;

    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    procedure SetupScript;
      begin
        SetupSRL;
        activateclient;
      end;

    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    begin
      SetupScript;
      BuyItems;
    end.

    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

  10. #10
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What are parameters?
    Whats the difference between functions and procedures?

  11. #11
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Parameters are the options in the ( ). Not all functions and procedures have them.

    Functions return a value. For example FindColor returns true if it found the color.

    Get Drigers tutorial.exe. See my FAQ part 1 link in sig.

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
  •