Sign in to follow this  
Followers 0
mircea

A confusing issue

3 posts in this topic

Hello guys, i want to enchance my aplications that i made for my self and make them easier to find some errors were i work so it would be more easier for me.

My problem is, that i don't know how to make the program exit from the function. I tried with the exit loop but no succes.

So what im trying to make is that to put the script on pause (so it dosen't use resource's with no reason) and i want that when the error appears on screen the aplication will do specific thing for specific errors.

On the aplication that i maded all the errors are in one -> until error1 or error2 or error3 (ex 2). And i want him to make when he finds error 2 for example to do a specific work or a specific mesage.

I hope you can guide me.

Thank you

AutoItSetOption("WinTitleMatchMode", 4)



Do 
    sleep(200)
until functie()

msgbox(0,"asd","iuhuuuu")

func functie()
    Select
        case WinGetHandle("classname=Notepad", "this one")
            msgbox(0,"e ok merge","merge cu this one")
            
        case WinGetHandle("classname=Notepad", "ceau")
            msgbox(0,"asd","merge cu ceau")
            
        case WinGetHandle("classname=Notepad", "a")
            msgbox(0,"asd","merge cu a")
    EndSelect

        

EndFunc

Ex 2

autoItSetOption("WinTitleMatchMode", 4)


while 1
    Do
        sleep(500)
    until WinGetHandle("classname=WindowsForms10.Window.8.app.0.378734a","FlowCheckTests_xFT:ASSEMBLY_FLOW_CHECK") OR WinGetHandle("classname=WindowsForms10.Window.8.app.0.378734a","FlowCheck_xFT:ConvertRetey") or WinGetHandle("classname=WindowsForms10.Window.8.app.0.378734a","FlowCheckTests_xFT:INTERACTIVE_FLOW_CHECK")
    
    ShellExecute("C:\rim\products\geminicft\scripts\RIM_GUI_StartScript.vbs")
    msgbox(0,"Interactive or Assambley Flow Check","DORIM PREVENIREA ERORILOR DE GEN ->> INTERACTIVE FLOWCHECK sau ASSAMBLEY FLOW CHECK<<--, DE ACEEA PROGRAMUL VA REPORNI, TE ROG CHEAMA UN TEHNICIAN DE TEST")
    

    
WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

My problem is, that i don't know how to make the program exit from the function. I tried with the exit loop but no succes.

did you try:

Return

??

Return should take you back to the calling function.

Edited by songersoft

Share this post


Link to post
Share on other sites

Thank you !!!

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  
Followers 0