BigDaddyO 61 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. hmm... I guess I have to have a signature... Share this post Link to post Share on other sites
Valik 478 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. Share this post Link to post Share on other sites
BigDaddyO 61 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 hmm... I guess I have to have a signature... Share this post Link to post Share on other sites