Zhelkus Posted June 2, 2008 Share Posted June 2, 2008 I've got an extremely simple script and there's this extremely weird problem bugging me horribly.#include <File.au3> #include <String.au3> $workingdir = "D:\Downloads\Lots of Videos\cgi.flash\f\src\" Dim $c = 0 $flashsearch = FileFindFirstFile($workingdir & "*.swf") While 1 If @error Then ExitLoop $c += 1 ToolTip("Scanning... found: " & $c & @CRLF & _ "Filename: " & FileFindNextFile($flashsearch) & @CRLF & _ @error, 0, 0) WEnd FileClose($flashsearch) Dim $flashes[$c + 1] $flashes[0] = 0The loop should stop when @error is set to 1... but it doesn't!! And the only thing I've got in that folder are flashes (.swf)! Could somebody point out my mistake plz? Link to comment Share on other sites More sharing options...
ChrisL Posted June 2, 2008 Share Posted June 2, 2008 I think it's because ToolTip is setting the error to 0 and not FileFindNextFile() #include <File.au3> #include <String.au3> $workingdir = "D:\Downloads\Lots of Videos\cgi.flash\f\src\" Dim $c = 0 $flashsearch = FileFindFirstFile($workingdir & "*.swf") While 1 $c += 1 $file = FileFindNextFile($flashsearch) If @error Then ExitLoop ToolTip("Scanning... found: " & $c & @CRLF & _ "Filename: " & $file & @CRLF & _ @error, 0, 0) WEnd FileClose($flashsearch) Dim $flashes[$c + 1] $flashes[0] = 0 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Zhelkus Posted June 2, 2008 Author Share Posted June 2, 2008 Thanks a lot. Not-so-seamlessly learning through T&E. 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