BigDaddyO Posted September 22, 2004 Posted September 22, 2004 I have been using this code all along and now I just installed the new 3.0.102 version of AutoIT and it does not like it any more. Func Screenshot() $SEARCH = FileFindFirstFile("c:\ScreenShot*.jpg") IniDelete($INIFILE, "ScreenShot", "Number") If $SEARCH = -1 Then EndFunc While 1 $FIND = FileFindNextFile($SEARCH) If @error Then ExitLoop IniWrite($INIFILE, "ScreenShot", "Number", $FIND) Wend FileClose($SEARCH) EndFunc The 4th line is no longer functioning and I don't understand why.
Valik Posted September 22, 2004 Posted September 22, 2004 It's never been valid, it was a bug that it didn't complain before. The keyword you want is Return, not EndFunc. See the helpfile for more.
BigDaddyO Posted September 22, 2004 Author Posted September 22, 2004 It's never been valid, it was a bug that it didn't complain before. The keyword you want is Return, not EndFunc. See the helpfile for more. <{POST_SNAPBACK}>Thanks, That works, I never even knew about the Return function before. Mike
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