Results 1 to 3 of 3

Thread: Developing a script

  1. #1
    Join Date
    May 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Post Developing a script

    Hi there,

    I'm trying to write a script that will look for a colour on the screen and click it. Ideally, what I'd like to do is somehow write a line of code that, once a set of coordinates has been clicked, will ignore them for a given period of time.

    e.g. mouse clicks at coordinates 121, 321 - I want the script then to ignore anything that happens at coordinates 121, 321 for x milliseconds

    I know this should be possible, I'm just struggling with the logic!

    Any help is appreciated,
    Thanks in advance
    Last edited by basestati0n; 05-06-2012 at 11:30 PM.

  2. #2
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    For static clicking > clicking certain coords on the screen put the coords in for X,Y, then 0,0 is the random pixel shift. What are you trying to click?

    Not Sure If i understood this correctly sorry if i didn't
    Simba Code:
    MMouse(X,Y,0,0);   SO MMouse(121, 321,15,15);

    MMouse(121,321,15,15);
    Wait(150 + Random(50)): // Will Move The Mouse To The Coords And Give a Small Wait
    Clickmouse2(True);
    Wait();//< Fill out how much time you want to wait here.
    Last edited by Google; 05-06-2012 at 11:22 PM.

  3. #3
    Join Date
    May 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Post

    Wow, thanks for your quick reply! The random mouse shift is quite a neat little trick (didn't know about that!).

    Essentially, the script is designed a for a game where the shooter is in the centre of the screen and objects move towards the shooter - if the object gets to the shooter, game over. I've got the script that identifies the colours properly and automatically clicks the objects, which is cool.

    Problem is, once the object has been clicked (it remains on the screen for a short period of time), the script keeps on clicking at the same object until it disappears (instead of moving to another object) - allowing other objects to reach the centre instead, thus ending the game!

    When several objects come onto the screen at once, obviously the script has trouble keeping up as it stays clicking the (now stationary) "dead" object.

    Any ideas how to get around this?

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •