Results 1 to 9 of 9

Thread: Web Macros

  1. #1
    Join Date
    Aug 2007
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Web Macros

    So, I've been using iMacros for FF for tasks, but it is severely limited in the free version. Then I remembered my ole' pals back at villavu!

    Can someone give me code examples for a script that loads a bitmap, compares it against a site, and then Lclick's it? I want it to actually move the mouse, none of that ghostmouse stuff. Is there a section of the wiki to send URL's to a browser?

    The functionality I need:
    Identify images
    Left click them
    Navigate to URL's

    I know that Simba/Scar can do all of this, but I don't remember how to call the functions. It's been almost 5 years since I wrote a script in simba.

    Help?
    Quote Originally Posted by Hobbit View Post
    ...i had faulty ram....they told me to format my hard drive...im like HOW TO F*** IS THAT GONNA HELP MY F***ING RAM??? YOU STUPID IDIOT!! then i hung up...lol

  2. #2
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Simba Code:
    program Example;
    {$i SRL\SRL.scar}


    procedure ClickBitmap;
    var
      YourBMP, x, y: Integer;
    begin
      YourBMP := BitmapFromString(3, 5, 'asdf8s9f789cvhauis74e9');
      if not(FindBitmap(YourBMP, x, y) then
        Ex := True;
      FreeBitmap(YourBMP);
      if Ex then
        Exit;
      Mouse(x, y, 0, 0, True);
    end;


    begin
      ClickBitmap;
    end.

  3. #3
    Join Date
    Aug 2007
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Where is the bitmap to string converter located now-a-days?
    Quote Originally Posted by Hobbit View Post
    ...i had faulty ram....they told me to format my hard drive...im like HOW TO F*** IS THAT GONNA HELP MY F***ING RAM??? YOU STUPID IDIOT!! then i hung up...lol

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    In Simba, it's under "Tools > Bitmap conversion".

    By the way, what's an "FF task"?

  5. #5
    Join Date
    Aug 2007
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    In Simba, it's under "Tools > Bitmap conversion".

    By the way, what's an "FF task"?
    FireFox Task.
    :P

    Also, The example posted doesn't work. You forgot to add 'Ex' as a variable, and it fails at:
    Code:
    [Error] (41:15): Type mismatch at line 40
    Compiling failed.
    Which is:
    Code:
     Ex := True;
    Current script:
    Code:
    program Example;
    {$i SRL\SRL.scar}
    
    
    procedure ClickBitmap;
    var
      YourBMP, x, y, Ex: Integer;
    begin
      YourBMP := BitmapFromString(155, 39, 'meJztm4GxpCAMQC3FUizFUizFU' +
            'izFUi4suxiSEEPw6+4cmczcfFchyQMS0FumYWE6gY5Bu3yhRDSTBO' +
            '7Njuj4tMVdbBKxajriu+dhWYd1G7a96xcpEAEuQOcUa6I5Tp3jDyg' +
            'wAlIlponmvDxvale7Ai+Jaaf5w5qYkukJy/Ljtv03Oi3LNF8X8FdK' +
            'TZP0LY52YBmP+nR8fk4D0BD/6ZoG1/2YpI7pCQSPcYCqYvFmGIdpL' +
            'SA24EWfPJWuQ0XHf5KLeLh5aQvLdvSrZx/sFFa4vtr6ikAD0/GaGZ' +
            'EmaQTK46Z4XRKxPMbxL13ngyEJD2wJaBJ3fD7J6O2LFj3VBkswE9C' +
            'IwB7/YoNrBPoJgvlBXXgcRKCv3oXrlwAdvExJy26ggwFQDjRoY0W6' +
            '7pkB1mGwULMhdHhg87kmAh2nrBE30LjQ4dbSdUdM7FAsNtQCDUxdZ' +
            'ov2Gx/BjuBZEGecWLZxoNkAKLhgBIqv42btHiXlqUSpQkUbSAt6ES' +
            'sCjSn1KaDuR7CU1kYHUPJTbVYi42FQ02jJBsLUAbSlTGoEauyU+I7' +
            '/VLKGDyjOCLUpSUyLtUC3PJsoIVKAusskD9D5eMSYp8isSaKXkU6g' +
            'q/agMRqWaa7YgGe6so06A/pKqfOfAyXVqYUp9v20FmoEmgVTbZ8oX' +
            'iqzUVEIqWIDbkoZVBagY+XJgwPotgvlnB66UoWvDz8fUONyxxWPBN' +
            'x7aRkxAlVwGIFWlUk+oOLBgnLQVAJ6yZKbzh5hUGGaeuOKkfHB09p' +
            'Pv+FaoEGhTFrrgO57hZKFF4eC36zswQFEqQsM1N6gpWW9OxiZe15c' +
            'gbO6U1prUzmGVUBfZdKpU1iq3N+zt6uHiExJ/PFTMXqXAxUR6L6QZ' +
            '7M8KBl5O9AwQ+3D0gE0Kt+7cfdJ/PlO7UKg01Q9N4kX6fEkowTlTq' +
            'Ahh9qcage6SymVMMpS3muYkVq3BWjKoQ6OlhEieqQDJUVRI9CpkMj' +
            '+DihnShhx33EKLrlsBNpithgHUfho0YAi77jxVUDjRsDnSGNMoOuS' +
            'F9z3Le9atPk2oMrbQJ8NOBRKNj8/KSoPhhuAkt30qe+Z15LltwHFC' +
            'RSsgj+TJuHLiGIDTihbuV8N6OjMID6gsaQnpirrjOg7vl+sOm4DSn' +
            'aUxviUbCBnm2oYtWMEny9YLI1saGaRHQqvfE59J6c6TwFV4k+qr1M' +
            'b9FrCArSqBOJ0aoGKbwwh4GRDaox/lnbnZ4DqFWm2Gi9FG0TRp6cE' +
            'VN7wuoEaN+OYgig8IZbiTwx4BGh2IsQ6UnCf73S2KqCmc4OTBte3p' +
            'WP8xzw8+GHCEXypEWP9QDy6B6iyqBIzSF8K0JCMzmhmQL0lEPVljj' +
            'TfQAfbqhs1fEc0HzjG+PliwSr8xSNtZz1+4rtX8breoAOo3lT2Deo' +
            'mX086zxWnjvi73Haa23vsHVN+qJmkXdsVVvjGpIn18+FBBnRwbWa7' +
            '+nS7rqlPJUCrrFLO6vrNOss0M6aj651F15uV/P/Q0hFiEliWw1vy7' +
            'XnLu2IFIqGYnA9Q6pkwxdrli8X6RrVj/XpRqP0DHKzwZw==');
      if not(FindBitmap(YourBMP, x, y) )then
        Ex := True;
      FreeBitmap(YourBMP);
      if Ex then
        Exit;
      Mouse(x, y, 0, 0, True);
    end;
    
    
    begin
      ClickBitmap;
    end.
    I can't remember what to do here... XD
    Sorry guys, it's been a long time :/
    Quote Originally Posted by Hobbit View Post
    ...i had faulty ram....they told me to format my hard drive...im like HOW TO F*** IS THAT GONNA HELP MY F***ING RAM??? YOU STUPID IDIOT!! then i hung up...lol

  6. #6
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    var
      YourBMP, x, y, Ex: Integer;
    to
    SCAR Code:
    var
      YourBMP, x, y: Integer;
      Ex: Boolean;

  7. #7
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Change this:
    Simba Code:
    var
      YourBMP, x, y, Ex: Integer;
    To
    Simba Code:
    var
      YourBMP, x, y: Integer;
      Ex: boolean;

    Hehe nevermind, Train beat me to it.

  8. #8
    Join Date
    Aug 2007
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Train View Post
    SCAR Code:
    var
      YourBMP, x, y, Ex: Integer;
    to
    SCAR Code:
    var
      YourBMP, x, y: Integer;
      Ex: Boolean;
    I really hate to bug you guys, but do I put the
    Code:
    Clickmouse(
    before or after the
    Code:
    if not
    .

    All that that script does is find it, it doesn't click.
    I still need to know how to navigate URL's?
    Quote Originally Posted by Hobbit View Post
    ...i had faulty ram....they told me to format my hard drive...im like HOW TO F*** IS THAT GONNA HELP MY F***ING RAM??? YOU STUPID IDIOT!! then i hung up...lol

  9. #9
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Use GetPage(page) to get the data from the page. And it is all logic. If the bitmap is not found, do you want it to click the mouse?
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

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
  •