Sign in to follow this  
Followers 0
IdiotProgrammer

Need some help - appreciated!

6 posts in this topic

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! :)

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0