Jump to content
Sign in to follow this  
skillsa2

Func not working

Recommended Posts

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

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

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 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

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  

×
×
  • Create New...