jbennett Posted November 6, 2008 Share Posted November 6, 2008 (edited) 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 November 6, 2008 by jbennett Link to comment Share on other sites More sharing options...
Pain Posted November 6, 2008 Share Posted November 6, 2008 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 More sharing options...
zerobazar Posted November 6, 2008 Share Posted November 6, 2008 You may also replace the first "Endfunc" by "Return" Check in the help file. Link to comment Share on other sites More sharing options...
jbennett Posted November 6, 2008 Author Share Posted November 6, 2008 Thanks that's brilliant ;-) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now