Jump to content

Pixelsearch..


Recommended Posts

$Enroute = Pixelsearch (799,171,834,487,0xFFFF00)

sleep (5000)

Pixelsearch (799,171,834,487,0xFFFF00)

If not @error then

mousemove ($Enroute[0], $Enroute[1], 5)

sleep (250)

mouseclick ("right",$Enroute[0], $Enroute[1])

sleep (250)

$WTZx = ($Enroute[0] + 80)

$WTZy = ($Enroute[1] + 10)

mousemove ($WTZx, $WTZy, 5)

sleep (100)

mouseclick ("left" ,$WTZx, $WTZy)

For some reason, I get the error message

Mousemove ($enroute[0], $enroute[1], 5)

mousemove ($enroute^Error

Error: subscript used with non-array variable

it was working just a few hours ago..

Edited by matrix10657
Link to comment
Share on other sites

for some reason

Would you like to try again?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

... accidently hit enter

No problem.

I think you need to say

$Enroute = Pixelsearch (799,171,834,487,0xFFFF00)

then $Enroute will be an array you can use

EDIT ADDED

Not so sure now I look at your post again because you do have that set at the very first line. $Enroute should be an array if the color was found. What happens if you check @error after the first call to pixelsearch?

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

thx. I'll use this thread to ask another question (in all of my noobishness)

If I want to use the command pixelgetcolor, how do I make it so if it finds a certain color, it does something.

for example-

$notinwarp = Pixelgetcolor (1,27)

if $notinwarp = 0xC1C6CF Then

(whatever)

does this mean that if $notinwarp is 0xc1c6cf then it will do (whatever). And also, is there a way to add a shade varience elemnt to get color and implement it in the way I need to?

Link to comment
Share on other sites

thx. I'll use this thread to ask another question (in all of my noobishness)

If I want to use the command pixelgetcolor, how do I make it so if it finds a certain color, it does something.

for example-

$notinwarp = Pixelgetcolor (1,27)

if $notinwarp = 0xC1C6CF Then

(whatever)

does this mean that if $notinwarp is 0xc1c6cf then it will do (whatever). And also, is there a way to add a shade varience elemnt to get color and implement it in the way I need to?

I'm no expert on colors, but you could try something like

$var = 0x111111

if $notinwarp > 0xC1C6CF - $var and $notinwarp < 0xC1C6CF + $var Then

do this

else

do the other

endif

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...