Jump to content

Help With A Script


Trement
 Share

Recommended Posts

Hello everyone. I'm having trouble creating a script and was wondering if you could help me. I've read the Help Files but still find myself stuck. What I need to do is that the mouse will click colors that are a specific color, then when that pixel changes into another color I need it to look for another pixel thats the same color and keep on doing that. But, there is a catch I need it to press a certain key once another certain pixel changes color. All of this must be done in a certain are aswell. I've tried some methods but have failed in them and was wondering if any of you could help me? I would be very grateful. Thank you!

Link to comment
Share on other sites

Hello everyone. I'm having trouble creating a script and was wondering if you could help me. I've read the Help Files but still find myself stuck. What I need to do is that the mouse will click colors that are a specific color, then when that pixel changes into another color I need it to look for another pixel thats the same color and keep on doing that. But, there is a catch I need it to press a certain key once another certain pixel changes color. All of this must be done in a certain are aswell. I've tried some methods but have failed in them and was wondering if any of you could help me? I would be very grateful. Thank you!

<{POST_SNAPBACK}>

PixelSearch. I broke it down for someone earlier today.

http://www.autoitscript.com/forum/index.php?showtopic=8490

Check that thread out.

psuedocode:

$keystroke = "A"

While 1
   Sleep(10)
   $color1 = Pixelsearch()
   $color2 = Pixelsearch()

   Select
      Case $color1 = true
         Mouseclick()
   
      Case $color2 = true
         Send($keystroke,0)

   EndSelect
Wend

I leave it to you to find the devil in the details.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

I did it and came up with this:

$keystroke = "F2"

While 1
   Sleep(10)
   $color1 = Pixelsearch( 200, 90, 1000, 600, AE0905, 5)
   $color2 = Pixelsearch( 165, 750, 167, 752, 858585, 5)

   Select
      Case $color1 = true
         Mouseclick("left")
  
      Case $color2 = true
         Send($keystroke, 1)

   EndSelect
Wend

I get an error which reads:

Line 17

$color1 = Pixelsearch(200, 90, 1000, 600, AE0O05, 5)

$color1 = Pixelsearch(200, 90, 1000, 600, ^ ERROR

Error: Unknown function name.

Where is the error? :lmao:

Link to comment
Share on other sites

I did it and came up with this:

I get an error which reads:

Line 17

$color1 = Pixelsearch(200, 90, 1000, 600, AE0O05, 5)

$color1 = Pixelsearch(200, 90, 1000, 600, ^ ERROR

Error: Unknown function name.

Where is the error?  :lmao:

<{POST_SNAPBACK}>

Your number isn't in hex format.

0xAE0905

0x858585

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

  • Developers

Fixed that. But now I get:

Line 21

Case $color1 = true

Case $color1 = ^ ERRPR

Error: Unknown function N=name.

<{POST_SNAPBACK}>

psuedocode:

:lmao:

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