Jump to content

How can i do this?


Recommended Posts

While 1
     $Temp = _PixelFindAll($i_PosLeft, $i_PosTop, $i_Width, $i_Height, 0, 2, $i_Step)
     For $Count = 1 To $Temp[0][0]
          MouseClick('left', $Temp[$Count][0], $Temp[$Count][1] + 40)
          Sleep(500)
     Next
     Sleep(2000)
WEnd

The link to _PixelFindAll() is in my signature.

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

The 0 in that line is the color. The 2 is that it may have a shade variation of 2.

To get the function _PixelFindAll() is http://www.autoitscript.com/forum/index.php?showtopic=7485

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

Give the exact area to look for and the 0x - ColorCode to look for. Also give the pizel size of the colored area.

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

If you use the Window spy which installs with AutoIt, it will show px color for a window wherever mouse is located. You can freeze the Spy prog, and cut and paste the color.

Look in Programs via start button.

J

If I am too verbose, just say so. You don't need to run on and on.

Link to comment
Share on other sites

lets say on the screen there are a couple spots of color 000000

how can i make the mouse click about half an inch under the 000000 and then sleep, then repeat the "click under black", and keep doing it againĀ  and again

<{POST_SNAPBACK}>

It sounds to me you already know where you want the mouse to click, so it's a matter of find out the coordinates for it to go to, eh? If you are trying to create a script that "notices" when that spot of color shows up, and then moves the mouse to the location and starts clicking, that's a whole different scenario.

Please clarify which you are trying to do.

The first you can find using autoit window spy or even mspaint. Since autoit window spy was explained already, here's how you use mspaint to do the exact same thing. Open up your screenshot in mspaint, move your mouse to the location you want the mouse to click on and the window coordinates are listed at the bottom right of mspaint. Write them down.

Use them in them in this script here:

;Example

While 1
Dim $i, $var;
$var = "(0,500)";coordinates for the mouse to click at
$i = 0;
Do
    MouseClick("left", $var, 2)
 ; left click at coordinates (0,500) 2 times.
    sleep (2000)
 ; sleep for 2 seconds
    $i = $i + 1
Until $i = 10000; the number of loops you want it to repeat
Wend

Sleepy today sorry bout that.

Edited by Joel

[font="Optima"]"Those who heed life with speculation and contemplation, are the ones stuck home with constipation." - Joel[/font]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...