renanzin Posted October 4, 2008 Posted October 4, 2008 Global $Paused HotKeySet("{F7}", "fFindColor") While 1 Sleep (100) Wend Local $Color = 0X19EE66 Dim $X[10] = [10,60,110,160,210,160,110,60,10,60] Dim $Y[10] = [20,30,40,50,60,50,40,30,20,10] For $i = 1 to 9 if fFindColor($Color,$X[$i],$Y[$i]) then exitloop endif Next Func UnFocus() WinActivate("Classname=Shell_TrayWnd") EndFunc ;==>Unfocus Func fFindColor($pColor, $pX, $pY, $pSize=12) Dim $ColorPos Unfocus() $ColorPos = PixelSearch($pX-$pSize,$pY-$pSize,$pX+$pSize,$pY+$pSize,$pColor) if not @error Then SoundPlay(@WindowsDir & "\media\tada.wav",1) Return True Else Return False EndIf Exit 0 EndFunc press F7 = error (25) : ==> Variable used without being declared.: but i tihnk all ok Oo
nf67 Posted October 4, 2008 Posted October 4, 2008 (edited) It might mean $Color, it seems like you haven't defined this function. Might be built-in though. Worth a try anyway Edited October 4, 2008 by nf67
Valuater Posted October 4, 2008 Posted October 4, 2008 you have the "HOTKEYSET()" calling a function that needs 3 minimum parameters. it can not work like that HotKeySet("{F7}", "ShowMe") While 1 Sleep(100) WEnd ; ----------------------- Functions --------------------------- Func ShowMe() Local $Color = 0X19EE66 Local $X[10] = [10, 60, 110, 160, 210, 160, 110, 60, 10, 60] Local $Y[10] = [20, 30, 40, 50, 60, 50, 40, 30, 20, 10] For $i = 1 To 9 If fFindColor($Color, $X[$i], $Y[$i]) Then ExitLoop EndIf Next EndFunc ;==>ShowMe Func UnFocus() WinActivate("Classname=Shell_TrayWnd") EndFunc ;==>UnFocus Func fFindColor($pColor, $pX, $pY, $pSize = 12) UnFocus() $ColorPos = PixelSearch($pX - $pSize, $pY - $pSize, $pX + $pSize, $pY + $pSize, $pColor) If Not @error Then SoundPlay(@WindowsDir & "\media\tada.wav", 1) Return True Else Return False EndIf EndFunc ;==>fFindColor 8)
renanzin Posted October 4, 2008 Author Posted October 4, 2008 (edited) dun give me a sound bro i need find that color HEX = 19EE66 and give me a sound x.x Edited October 4, 2008 by renanzin
Paro Posted October 6, 2008 Posted October 6, 2008 (edited) não entendeu ainda ? tem que ter 3 parametros, no seu ta puxando só 2 ^^ Edited October 6, 2008 by Paro
Developers Jos Posted October 6, 2008 Developers Posted October 6, 2008 não entendeu ainda ? tem que ter 3 parametros, no seu ta puxando só 2 ^^..and your problem is what? We don't need bully type noobs here .Jos 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.
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