sandman Posted April 21, 2007 Share Posted April 21, 2007 (edited) I'm surprised that I forgot how to do this.. anyway...I have set up a function that will do this (in chronological order)Read a fileAnalyze that fileBased on a integer value in the file, read a file with the prefix 'news' and then a numberKeep doing that until the number matches the number in the fileSo, I want this in an array, too. This is my prospective code.. probably nothing near what I should be doing:$pgnumval = FileRead("news.txt") For $i = 0 To $pgnumval Step 1 $i[+1] = FileRead("news" & $i & ".txt") NextWhat are your thoughts on this.. and how can I do it? Edited April 21, 2007 by sandman [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...
BrettF Posted April 21, 2007 Share Posted April 21, 2007 I'm surprised that I forgot how to do this.. anyway... I have set up a function that will do this (in chronological order)Read a fileAnalyze that fileBased on a integer value in the file, read a file with the prefix 'news' and then a numberKeep doing that until the number matches the number in the fileSo, I want this in an array, too. This is my prospective code.. probably nothing near what I should be doing: $pgnumval = FileRead("news.txt") For $i = 0 To $pgnumval Step 1 $i[+1] = FileRead("news" & $i & ".txt") NextoÝ÷ ÙhZµªÞÊ«¶.l¢{aƧv0q©Èvþ«¨µäáȬ{ayªëk&uû§rب«¢+Ø(%%%ÍÉÉä ÀÌØíÙÉÉä¤Q¡¸($%I¥´ÀÌØíÙÉÉåmU ½Õ¹ ÀÌØíÙÉÉ䤬Åt($$ÀÌØíÙÉÉåmU ½Õ¹ ÀÌØíÙÉÉ䤴ÅtôÀÌØíÍY±Õ($%MÑÉÉ½È À¤($%IÑÕɸÄ(%±Í($%MÑÉÉ½È Ä¤($%IÑÕɸÀ(%¹%( Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
sandman Posted April 21, 2007 Author Share Posted April 21, 2007 (edited) I just read the ArrayAdd function.. so couldn't I just do it like this? Dim $pgnews[0] For $i = 0 To $pgnumarticles Step +1 _ArrayAdd($pgnews, "news" & $i & ".txt") Next Edited April 21, 2007 by sandman [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...
sandman Posted April 21, 2007 Author Share Posted April 21, 2007 Okay, one more thing: How can I return all parts of an array? Will Return $array do it? Or is it not that simple? [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...
BrettF Posted April 21, 2007 Share Posted April 21, 2007 Okay, one more thing: How can I return all parts of an array? Will Return $array do it? Or is it not that simple?Like this: For $i = 1 to Ubound($array) -1 Msgbox (0, "Array Part: " &$i, "Value:" &@CRLF&$array[$i]) Next Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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