Jump to content

Looking for help with PixelSearch and SoundPlay


Recommended Posts

Hello, I've just started using AutoIt and I've ran into a bit of a problem. I'm trying to write a script that will play a sound if a certain color is found within a certain area.

PixelSearch ( 33, 650, 450, 550, 2493954, 10 )
If Not @error Then SoundPlay("C:\Windows\media\tada.wav", 1)

This is what I have and I can't get it to work. I'm sure it is just a noob mistake, but would someone explain to me what I'm doing wrong? Thanks!

Link to comment
Share on other sites

Hello, I've just started using AutoIt and I've ran into a bit of a problem. I'm trying to write a script that will play a sound if a certain color is found within a certain area.

PixelSearch ( 33, 650, 450, 550, 2493954, 10 )
If Not @error Then SoundPlay("C:\Windows\media\tada.wav", 1)

This is what I have and I can't get it to work. I'm sure it is just a noob mistake, but would someone explain to me what I'm doing wrong? Thanks!

coordinates can not be right, needs to be like this

Pixelsearch(TopLeftX, TopleftY, BottomRightX, BottomRightY, Color, shade)
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...