Jump to content

FAst help please


Hyflex
 Share

Recommended Posts

I have PixelSearch searcing in a certain location for a certain color how do i do a

While 1
><><><>< HERE ><><><><; I want mouse to move the what PixelSerch Finds.
WEndoÝ÷ ØAºÚ"µÍÌÍÔ]ÝHL[ÈÔÙ][ÌJ
BÚ[HB  ÌÍØÛÛÜH^[ÙXÚ
MÍLMÎL
K   ÌÍÔ]ÝH
BYÜ[ÒTIÌÌÎÉÌÌÎÉÌÌÎÂ[YÑ[[[Â

Im guessing its got something to do with: http://www.autoitscript.com/autoit3/docs/f...s/MouseMove.htm

Edited by XxXGoD
Link to comment
Share on other sites

Does the following then look right?

; Hotkey Settings
HotKeySet("{END}","Escape")
; Hotkey Settings End

; Main Settings / Constants
$AAIM = 0x6A0065
; Main Settings / Constants End

; Start
While 1
    $coord = PixelSearch( 180, 46, 185, 53, $AAIM, 1 )
    If @error Then
 MouseMove($coord[0], $coord[1])
    EndIf
WEnd
;End


; Exit Program
Func Escape()
    Exit
EndFunc
; Exit Program End
Edited by XxXGoD
Link to comment
Share on other sites

Hmmm... Let's see. If I wanted to move the mouse and then click what function would I be looking for. Ah, why I'd want to use the nifty AutoIt Help File to look for MouseClick which does the same thing as MouseMove, but also clicks the mouse.

AutoIt Help: Read it, know it, use it. :whistle:

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

  • Moderators

Hmmm... Let's see. If I wanted to move the mouse and then click what function would I be looking for. Ah, why I'd want to use the nifty AutoIt Help File to look for MouseClick which does the same thing as MouseMove, but also clicks the mouse.

AutoIt Help: Read it, know it, use it. :whistle:

In short RTFM?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Thanks, that helped ALOT!, i cant find anywhere in help files and online documentation on how to move down X ammount from the thing the pixel search finds.

Generally we use math to do that.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

SmOke_N, .... how exactly just giv me some hits and an exaple for me t play with.

See below it has: MouseMove($coord[0], $coord[1]) how do i do like a move down x ammount?

HotKeySet("{END}","Escape")
$AAIM = 0x6A0065

While 1
  $coord = PixelSearch( 180, 46, 185, 53, $AAIM, 1 )
  If not @Error Then MouseMove($coord[0], $coord[1]) 
WEnd

Func Escape()
  Exit
EndFunc
Link to comment
Share on other sites

  • Moderators

SmOke_N, .... how exactly just giv me some hits and an exaple for me t play with.

See below it has: MouseMove($coord[0], $coord[1]) how do i do like a move down x ammount?

HotKeySet("{END}","Escape")
$AAIM = 0x6A0065

While 1
  $coord = PixelSearch( 180, 46, 185, 53, $AAIM, 1 )
  If not @Error Then MouseMove($coord[0], $coord[1]) 
WEnd

Func Escape()
  Exit
EndFunc
Examples of what? You haven't asked a question really other than how to offset the movement.

Well if $coord[0] = The x coord, and I want to move in either a left or right direction, I would use - or + ($coord[0] - something) or ($coord[0] + something).

And $coord[1] = the Y position. (Up or down)

Anything other than that, you need to be ALOT!!! more specific, with explicit details, most of us aren't mind readers.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Sorry im not the best at explaing, thanks but im confused how would i calculate how far down...

If you want to move to a specific color then you have all that you need.

$iPix = PixelSearch(xTopLeft, yTopLeft, xBottomRight, xBottomLeft, Color)
If IsArray($iPix) Then MouseMove($iPix[0], $iPix[1])
That's it man.

If your going off Client Coords / or Window Coords / or Screen Coords, then you need to look at "Opt" in the help file and find PixelCoordMode / MouseCoordMode and what to set those too.

If that isn't enough, then you're SOL.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

If you want to move to a specific color then you have all that you need.

$iPix = PixelSearch(xTopLeft, yTopLeft, xBottomRight, xBottomLeft, Color)
If IsArray($iPix) Then MouseMove($iPix[0], $iPix[1])
That's it man.

If your going off Client Coords / or Window Coords / or Screen Coords, then you need to look at "Opt" in the help file and find PixelCoordMode / MouseCoordMode and what to set those too.

If that isn't enough, then you're SOL.

Thanks again another way wat will work but like u said on it before with the - Y how can i tell how many to deduct form coord[1]

Link to comment
Share on other sites

  • Moderators

Thanks again another way wat will work but like u said on it before with the - Y how can i tell how many to deduct form coord[1]

The above code(s) posted click the exact spot where the color was found. It returns the coords as I explained previously. Why are you talking about deduct... what do you want to deduct and why?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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