Jump to content

End Function early if NO exists in .ini file


 Share

Recommended Posts

Hi everyone,

I've got this piece of code that checks if NO exists in an .ini file ad if it does the function will end, but if it doesn't then the function will continue.

Does anyone know how I can get this to work as at the moment I seem to be getting errors. Thanks

P.S there is a good reason why I don't want to use 'exit'

Func _Perform_Daily_Backup()
    
    $perform_daily = IniRead(@scriptdir & "\Configuration.ini", _ 
"DAILY_BACKUP", "run_as_daily", "")
    if StringInStr($perform_daily, "NO") then
        Endfunc

        else
        endif
    msgbox(4096,""GREAT", "Cannot find NO",0)

endFunc
Edited by jbennett
Link to comment
Share on other sites

Func _Perform_Daily_Backup()

$perform_daily = IniRead(@scriptdir & "\Configuration.ini", _

"DAILY_BACKUP", "run_as_daily", "")

If StringInStr($perform_daily, "NO") Then

; do nothing

Else

Msgbox(4096,"GREAT", "Cannot find NO",0)

EndIf

EndFunc

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...