skillsa2 Posted April 15, 2013 Share Posted April 15, 2013 (edited) Hi, im trying to make a simple program to loop pixelsearch, if the program founds the pixel then i want a msgbox to show up, i also want it to loop but i get this error and i dont know why =( HotKeySet ("{F1}", "Start") HotKeySet ("{F3}", "_Exit") While 1 Sleep(250) WEndFunc Start() While 1 Local $coord = PixelSearch(0, 0, 20, 300, 0xFF0000) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf WEnd EndFuncFunc _Exit() Exit Edited April 15, 2013 by skillsa2 Don't take life too seriously. You'll never escape it alive anyway. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 15, 2013 Moderators Share Posted April 15, 2013 What error are you receiving? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
skillsa2 Posted April 15, 2013 Author Share Posted April 15, 2013 "Error:"Func" statemant has no matching "EndFunc". Don't take life too seriously. You'll never escape it alive anyway. Link to comment Share on other sites More sharing options...
Nessie Posted April 15, 2013 Share Posted April 15, 2013 Tada!: HotKeySet("{F1}", "Start") HotKeySet("{F3}", "_Exit") While 1 Sleep(250) WEnd Func Start() While 1 Local $coord = PixelSearch(0, 0, 20, 300, 0xFF0000) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf WEnd EndFunc ;==>Start Func _Exit() Exit EndFunc ;==>_Exit As Scite said you don't have closed your Func status. Hi! My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s). My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all! My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file Link to comment Share on other sites More sharing options...
skillsa2 Posted April 15, 2013 Author Share Posted April 15, 2013 WOW tnx Nessie for the Quick feed back Don't take life too seriously. You'll never escape it alive anyway. Link to comment Share on other sites More sharing options...
water Posted April 15, 2013 Share Posted April 15, 2013 Could you please give your threads a meaningful title? "Doesn't work" doesn't help us to decide if it is worth to read the thread. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
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