PnutPnut Posted March 23, 2007 Posted March 23, 2007 I would like to be able to find the x and the y co-ordinates on my computer at a point. I would like to be able to find out what colour is at that point. And if that colour is at that point I would like to be able to have a program run automatically if it occurs. I found out the hex of the colour 0x9FFFFE - but i don't really know how to use this.... In particular, i am wanting to play a music file. any type of file really, just something to get my attention when i am sent a message.... (im not using msn lol) (a message in a particular game i play) thanks.
Developers Jos Posted March 23, 2007 Developers Posted March 23, 2007 I think there is no question in your post. I think you posted in the wrong forum * moved * 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.
PnutPnut Posted March 23, 2007 Author Posted March 23, 2007 (edited) If PixelGetColor(30,773) = 0x9FFFFE then ; another built-in command, the one indicates play until the sound finishes. SoundPlay(@WindowsDir & "\media\Windows XP Logon Sound.wav",1) Endif This is what I have so far..... When i open up the .au3 file it looks for the colour '0x9FFFFE' at position x30 y773.... and if it finds that it plays the '.wav' file.... My only problem now is... if it doesn't find the colour at that position, the .au3 script just closes.... Is there some way to make it so that the script continually searches until it finds it instead of giving up after 1 try? Thanks. Edited March 23, 2007 by PnutPnut
PantZ4 Posted March 23, 2007 Posted March 23, 2007 (edited) HotKeySet("{ESC}","_Exit") While 1 Sleep(10) ;Remember Sleep! If not, this script will process hunger! If PixelGetColor(30,773) = 0x9FFFFE Then SoundPlay(@WindowsDir & "\media\Windows XP Logon Sound.wav",1) WEnd Func _Exit() Exit EndFunc Like this? Edited March 23, 2007 by Mr. Zero
Richard Robertson Posted March 27, 2007 Posted March 27, 2007 Yes, sleeping is good. I've seen the effects of not using sleep in some of my less complicated programs like the start button escape.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now