Results 1 to 14 of 14

Thread: Short script help

  1. #1
    Join Date
    Dec 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Short script help

    So, I'm trying to write a very simple script that will click on a button that moves to four different spots after every time it's clicked. This is, however, my first look at pascal, so I'm unsure what I'm missing to make this work. This is the error I get:
    Line 1: [Error] (1:1): Unable to register function function FindGapsTPA(TPA : TPointArray; MinPixels: Integer): T2DPointArray; in script C:\Users\Downloads\SCAR 3.12\Scripts\

    I tried downloading a new version of Scar to see if it would fix it, but I can't get any new versions to work properly - they all crash before they load it.

    Anyway, here's the script

    Code:
    program new;
    var
    x,y;integer;
    begin
    repeat
         if(getcolor(617,424)=16053492) then
         clickmouse(617,424,True);
         else if(getcolor(643,422)=16053492) then
         clickmouse(643,422,True);
         else if(getcolor(645,455)=16053492) then
         clickmouse(645,455,True);
         else if(getcolor(615,448)=16053492) then
         clickmouse(615,448,True);
    until(x=y)
    end.
    I used x=y just to use something random so that the script will never end. Nothing special.
    Last edited by Icefyre; 12-22-2009 at 04:58 AM.

  2. #2
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simple human clicker

    SCAR Code:
    {.Include SRL\SRL.SCAR}

    var
      X, Y: Integer;

    begin
      SetUpSRL;
      ActivateClient;
      Wait(1000);
      Mouse(X, Y, 0, 0, True);
    end.

    What you're trying to do (Purely Machine-Like):

    SCAR Code:
    begin
      ActivateClient;
      Wait(1000);
      repeat
        if (GetColor(617, 424) = 16053492) then
         ClickMouse(617, 24, True)
        else
          if (GetColor(643, 422) = 16053492) then
            ClickMouse(643, 422, True)
          else
            if (GetColor(645, 455) = 16053492) then
              ClickMouse(645, 455, True)
            else
              if (GetColor(615, 448) = 16053492) then
                ClickMouse(615, 448, True);
      until (False);
    end.

    Explain what you're using this for...

  3. #3
    Join Date
    Dec 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    "I'm trying to write a very simple script that will click on a button that moves to four different spots after every time it's clicked."

    Basically, there are four different options for the button to move every time it's clicked - I want to make the script click the button until I stop it.

    So should I add the human clicker code you posted?

  4. #4
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Icefyre View Post
    "I'm trying to write a very simple script that will click on a button that moves to four different spots after every time it's clicked."

    Basically, there are four different options for the button to move every time it's clicked - I want to make the script click the button until I stop it.

    So should I add the human clicker code you posted?
    Probably not since whatever you're clicking buttons with doesn't have a macro detection system. The 2nd code box window I gave you is a working copy of what you we're trying to accomplish there... you might need like Wait(100); right before until (False) to keep it from sending 1000+ functions a second....

  5. #5
    Join Date
    Dec 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm still getting the same error:

    Line 1: [Error] (1:1): Unable to register function function FindGapsTPA(TPA : TPointArray; MinPixels: Integer): T2DPointArray; in script C:\Users\Downloads\SCAR 3.12\Scripts\program1.scar

    Really, the button I'm trying to click is on a website - it's really nothing important, but I'm trying to learn this from scratch. sorry for the trouble.

  6. #6
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your firewall must have deleted some plugins for SCAR or just messed it up... trying doing something to undo all that plus.... get a better version of SCAR. Find the SCAR 3.23 beta release SVN check out link and get the latest revision

  7. #7
    Join Date
    Dec 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I tried getting 3.23 - I can't get it to load at all. It crashes before it even comes up. I even went through a couple tutorials just to see if I was doing something wrong - I don't have the answer.

    I guess I'm SOL?

  8. #8
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Icefyre View Post
    Well, I tried getting 3.23 - I can't get it to load at all. It crashes before it even comes up. I even went through a couple tutorials just to see if I was doing something wrong - I don't have the answer.

    I guess I'm SOL?
    It's your firewall man, disable it.

  9. #9
    Join Date
    Dec 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't have a firewall enabled. Believe me, firewalls have a history of getting in the way of things - trust me, it's never up.

  10. #10
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Icefyre View Post
    I don't have a firewall enabled. Believe me, firewalls have a history of getting in the way of things - trust me, it's never up.
    Try downloading SCAR portable then to a USB drive.

  11. #11
    Join Date
    Jan 2007
    Location
    the middle of know-where
    Posts
    1,308
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    First, what operating system are you using?
    Second, have you made sure that all of your directory files/folders are where they are supposed to be?
    Third, do you or have you done any registry editing on your computer that may have messed some stuff up?
    When you try and run the SCAR, is it running in a flash or java program? ... have you selected the screen that you will be clicking in?
    Last edited by anonymity; 12-22-2009 at 08:29 AM.
    On vacation in NeverLand,
    Code:
    typedef int bool;
    enum { false, true };

  12. #12
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by anonymity View Post
    Is it running in a flash or java program? ... have you selected the screen that you will be clicking in?
    Read the thread dude he is having trouble with scar not the script

  13. #13
    Join Date
    Jan 2008
    Location
    Houston, Texas, USA
    Posts
    770
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Delete everything. Go to this link and follow everything step-by-step to set up scar and SRL.

    http://www.villavu.com/forum/showthread.php?t=47714

  14. #14
    Join Date
    Dec 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey, a friend of mine and I sat down and worked on it. We finally figured it out. Even though I wasn't getting the error for it, I had to replace my BASE.dll file in my systems32 folder with a current one. Odd.

    Thank you, by the way, for the script. It's working wonderfully. I appreciate all the help.

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
  •