Jump to content

Need some help - appreciated!


Recommended Posts

Hey all, I am having a little trouble getting my script to work. Basically I want the camera to be rotated using the key C, then while it is rotating to search for a certain colour and if found click it repeatedly.

So far I have this code, but I doubt I have it correctly done.

MsgBox(0, "3d Engine Scanner", "Active.")
WinWaitActive("3dproen")
Send("{c down}");Holds the C key down, rotating the camera to find the object.
$coord = PixelSearch( 0, 0, 20, 300, 0x1b1b26 )
If Not @error Then
    MouseClick("left", $coord[0], $coord[1]);Scans for the blue color that is over the majority of the object.
EndIf
While 1
    $mouse = MouseGetPos()
    $pix = PixelGetColor($mouse[0], $mouse[1])
    If $pix = 0x1b1b26 Then;Clicks on the Object. 
        MouseClick("left")
    EndIf
WEnd

Help is greatly appreciated! :)

Link to comment
Share on other sites

You are now checking for the color at the mouse pointer. is that what you want?

Ah, I am trying to get the script to find the color from somewhere on the screen (never the same exact location), then if found to click it repeatedly.

Thanks for the quick reply. :)

Edited by IdiotProgrammer
Link to comment
Share on other sites

  • Developers

something like this?

MsgBox(0, "3d Engine Scanner", "Active.")
WinWaitActive("3dproen")
Send("{c down}");Holds the C key down, rotating the camera to find the object.
While 1
    $coord = PixelSearch(0, 0, 20, 300, 0x1b1b26)
    If Not @error Then MouseClick("left", $coord[0], $coord[1])
    Sleep(10)
WEnd

You need to specify the area in Pixelsearch you want to scan.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

something like this?

MsgBox(0, "3d Engine Scanner", "Active.")
WinWaitActive("3dproen")
Send("{c down}");Holds the C key down, rotating the camera to find the object.
While 1
    $coord = PixelSearch(0, 0, 20, 300, 0x1b1b26)
    If Not @error Then MouseClick("left", $coord[0], $coord[1])
    Sleep(10)
WEnd

You need to specify the area in Pixelsearch you want to scan.

So would this scan the enitre window?

Again, thankyou.

Link to comment
Share on other sites

  • Developers

So would this scan the enitre window?

Did you read the last line in my post? :)

Open the helpfile and read up on the specified function.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...