Jump to content
Sign in to follow this  
skillsa2

Func not working

Recommended Posts

skillsa2

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 by skillsa2

Don't take life too seriously. You'll never escape it alive anyway.

Share this post


Link to post
Share on other sites
JLogan3o13

What error are you receiving?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
skillsa2

"Error:"Func" statemant has no matching "EndFunc".


Don't take life too seriously. You'll never escape it alive anyway.

Share this post


Link to post
Share on other sites
Nessie

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

Share this post


Link to post
Share on other sites
skillsa2

WOW tnx Nessie :D for the Quick feed back :)


Don't take life too seriously. You'll never escape it alive anyway.

Share this post


Link to post
Share on other sites
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  

×