JustDoIt Posted August 29, 2007 Share Posted August 29, 2007 Newbie here. I am looking for AutoIt's function that does "EOF". Can someone tell me what that is ? Also, does AutoIt have something similar to BASIC's TIME$ function ? Thank you. Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 29, 2007 Share Posted August 29, 2007 Hi, EOF = end of file? $time= ??? What do you want to do? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
JustDoIt Posted August 29, 2007 Author Share Posted August 29, 2007 EOF = end of file? Yes.$time= ???What do you want to do? To return the system time. Link to comment Share on other sites More sharing options...
ChrisL Posted August 29, 2007 Share Posted August 29, 2007 #Include <Date.au3> _NowTime ( [$sType] ) $sType Default: 3 = Display a time using the time format specified in your computer's regional settings. 4 = Display a time using the 24-hour format (hh:mm). 5 = Display a time using the 24-hour format (hh:mm:ss). [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...
JustDoIt Posted August 29, 2007 Author Share Posted August 29, 2007 Thanks Christ for pointing out _NowTime function Is this code considered EOF function ? $x = FileReadLine("C:\someFile.txt") If @error = -1 Then Link to comment Share on other sites More sharing options...
sandman Posted August 29, 2007 Share Posted August 29, 2007 This will work to get the last line of a file:#include <File.au3> $lines = _FileCountLines("file.txt") $line = FileReadLine("file.txt", $lines) [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
ChrisL Posted August 30, 2007 Share Posted August 30, 2007 Thanks Christ for pointing out _NowTime function Is this code considered EOF function ? $x = FileReadLine("C:\someFile.txt") If @error = -1 Then Yes in what you are doing if @error returns -1 then you have reached the end of file From the help file... Sets @error to -1 if end-of-file is reached. [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...
sandman Posted August 30, 2007 Share Posted August 30, 2007 You can just put that in a loop:Do $x = FileReadLine("C:\somefile.txt") Until @error = -1But instead of doing the loop, which could take a while, try the way I suggested earlier. Only one FileReadLine, because if the file was big this method would take a loooooooong time. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] 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