Jump to content
Sign in to follow this  
pingpong24

help looping.

Recommended Posts

pingpong24

if you need the full source code please click on my signature else, you can use the code below to solove my problem.

i basically want it to go back to certin line in the code and redo it.. i.e. go back to func ocr() and excute it..

fun ocr ($x,$y,$bx,$by, $qfz)

............

........

next

If StringLen($result) < $qfz Or StringLen($result) > $qfz

Then

;re scan the specified area

call(ocr)

endif

Share this post


Link to post
Share on other sites
Valuater

maybe this small example could help

#include<GUIConstants.au3>

$var = "Just Started"
domyfunction()

GUICreate("MY GUI")
$btn = GUICtrlCreateButton("test", 150, 150, 50, 20)
GUISetState()

$var ="Middle of Program"

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE then
        $var ="Now Leaving Program"
        domyfunction()
        Exit
    EndIf
    
    If $msg = $btn Then domyfunction()
        
WEnd

; --------------- Functions -------------------

Func domyfunction()
    MsgBox(64, "Message", $var & "   ")
EndFunc

8)


NEWHeader1.png

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  

×