Truffle Posted August 1, 2005 Share Posted August 1, 2005 Hello! A program I wrote reads an INI file, which just grew to 69KB in size. I just found out that 98/ME users get an error after the program refers to anything past that 64KB buffer thingy. XP works though, since Microsoft seems to have dropped that limit. But do you guys know of a way I can get around this? Most of the people that use this program run Windows 9x. Thanks! Link to comment Share on other sites More sharing options...
GaryFrost Posted August 1, 2005 Share Posted August 1, 2005 (edited) Multiple Ini's? or flat file? Edited August 1, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Truffle Posted August 1, 2005 Author Share Posted August 1, 2005 it would be cool i if i could get it to query my MySQL server on my web host.. But i dont think thats possible is it? Link to comment Share on other sites More sharing options...
GaryFrost Posted August 1, 2005 Share Posted August 1, 2005 you could basicly do the same thing with a flat file or your current ini file example file=somefile then read each line in using filereadline, then split the line using the "=" as the splite char. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted August 1, 2005 Share Posted August 1, 2005 Think it's possible in the beta version. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Truffle Posted August 1, 2005 Author Share Posted August 1, 2005 you could basicly do the same thing with a flat file or your current ini fileexamplefile=somefilethen read each line in using filereadline, then split the line using the "=" as the splite char.<{POST_SNAPBACK}>Here's a sample of the INI file im using[version]numMaps=218[zips]1=demoranch.zip2=spacewar.zip3=oltown.zip4=olcity.zip5=ctfxmas.zip6=alamo.zip7=barn1.zip8=beerformyhorses.zip9=bigstick.zip10=bluwater.zipIts updated twice a month with long paragraphs in the bottom section there are currently 1762 linesThink it's possible in the beta version.i think i saw some talk about MySQL but it had to be installed on the machine the program was running from with the ODBC driver? Link to comment Share on other sites More sharing options...
GaryFrost Posted August 1, 2005 Share Posted August 1, 2005 Haven't looked into it, but I'm sure you would need the odbc driver on the client machine. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted August 1, 2005 Share Posted August 1, 2005 Might want to check this thread #77619 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
blindwig Posted August 1, 2005 Share Posted August 1, 2005 Is your file just a flat list of ZIP files? Then why not just make it a plain text file containing the list, and use _FileReadToArray() to get the list when you need it? My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 1, 2005 Share Posted August 1, 2005 After I complete AutoIt functions FileHash(), and StringHash(), I do believe I am going to take on the massive project of MySQL and AutoIt integration. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Truffle Posted August 1, 2005 Author Share Posted August 1, 2005 (edited) Is your file just a flat list of ZIP files? Then why not just make it a plain text file containing the list, and use _FileReadToArray() to get the list when you need it?<{POST_SNAPBACK}>Sorry the example i posted was not a good one... Attached is the whole INI file.(renamed to txt because board wouldnt allow ini to be uploaded)The largest section is the [mapinfo] section as it contains a review of each of the levels for the game.After I complete AutoIt functions FileHash(), and StringHash(), I do believe I am going to take on the massive project of MySQL and AutoIt integration.JSThat sounds really cool!maplist.txt Edited August 1, 2005 by Truffle Link to comment Share on other sites More sharing options...
blindwig Posted August 1, 2005 Share Posted August 1, 2005 It looks like you're trying to use an INI file as a data base. You'd probably be better off using a CSV file. I'd use 2 files, one for your maps and the other for your authors/reviewers: [Mapsfile] zipfile,filesize,mapname,authornumber,screenshot,modes,reviewernumber,mapinfo Example line: demoranch.zip,14KB,Demolition Ranch,1,demoranch.jpg,31,1,Small DM arena map designed for Sanchez/Dynamite matches only [NamesFile] AuthorNumber,AuthorName,ContactInfo,etc... 1,Truffle,truffle@truffle.com,etc... and the 31 in the mapsfile example is a binary flag value to say that the map supports all 5 game modes. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Truffle Posted August 2, 2005 Author Share Posted August 2, 2005 It looks like you're trying to use an INI file as a data base. You'd probably be better off using a CSV file.I'd use 2 files, one for your maps and the other for your authors/reviewers:[Mapsfile]zipfile,filesize,mapname,authornumber,screenshot,modes,reviewernumber,mapinfoExample line:demoranch.zip,14KB,Demolition Ranch,1,demoranch.jpg,31,1,Small DM arena map designed for Sanchez/Dynamite matches only[NamesFile]AuthorNumber,AuthorName,ContactInfo,etc...1,Truffle,truffle@truffle.com,etc...and the 31 in the mapsfile example is a binary flag value to say that the map supports all 5 game modes.<{POST_SNAPBACK}>so to get around the 64K limit with CSV would i have to have the users set up a System DSN in ODBC? Or how would I do this?Thanks Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 2, 2005 Share Posted August 2, 2005 Contrary it seems to popular belief (or atleast in this thread) a cvs isnt a database. It is an organized way of storing data outside of an actual database. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Valuater Posted August 2, 2005 Share Posted August 2, 2005 hows-about this idea $days = StringSplit("Sun,Mon,Tue,Wed,Thu,Fri,Sat", ",") ;$days[1] contains "Sun" ... $days[7] contains "Sat" for $x = 1 to $days[0] MsgBox(0,"data as split", $days[$x] & @CRLF & "is number: " & $x & " " ) Next hope it helps 8) Link to comment Share on other sites More sharing options...
therks Posted August 2, 2005 Share Posted August 2, 2005 (edited) Contrary it seems to popular belief (or atleast in this thread) a cvs ...<{POST_SNAPBACK}>You mean CSV. Comma Seperated Values. Truffle, these guys are still talking about a file, like info.txt, or maps.txt, etc. Just writing it different, and setting up your own parsing functions instead of using the INI ones.Running with blindwig's example, I created the attached code, have a look at it and try it out. Also look at maps.txt for an example of how to format the file. I varied from blindwig's idea in that I used TAB's as seperators instead of commas, because you use commas in your descriptions so it would have messed everything up. And I also put the author/reviewer names right into the maps.txt instead of having a seperate file to read the info from. That's getting a little more complicated and I figured I'd let you wrap your head around this much of it first. *Edit: I guess if I mention attached code I should actually attach it, eh? Edited August 2, 2005 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 2, 2005 Share Posted August 2, 2005 You mean CSV. Comma Seperated Values. Truffle, these guys are still talking about a file, like info.txt, or maps.txt, etc. Just writing it different, and setting up your own parsing functions instead of using the INI ones.Running with blindwig's example, I created the attached code, have a look at it and try it out. Also look at maps.txt for an example of how to format the file. I varied from blindwig's idea in that I used TAB's as seperators instead of commas, because you use commas in your descriptions so it would have messed everything up. And I also put the author/reviewer names right into the maps.txt instead of having a seperate file to read the info from. That's getting a little more complicated and I figured I'd let you wrap your head around this much of it first. *Edit: I guess if I mention attached code I should actually attach it, eh?<{POST_SNAPBACK}>Yes, CSV . I have been on Fedora Core 4 alot recently.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
DaleHohm Posted August 2, 2005 Share Posted August 2, 2005 Being an opportunist, I wanted to put in a plug here for a thought I dropped in to the Idea Lab some time ago for creating an XML variant of an INI file:XML Ini FilesDale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Truffle Posted August 2, 2005 Author Share Posted August 2, 2005 Being an opportunist, I wanted to put in a plug here for a thought I dropped in to the Idea Lab some time ago for creating an XML variant of an INI file:XML Ini FilesDale<{POST_SNAPBACK}>Interesting concept. Would like to help with it but I have no idea on where to start. Infact, I'm not even sure if I quite understand XML. It's like your own custom HTML tags that are only interpreted by your app right? Link to comment Share on other sites More sharing options...
Truffle Posted August 2, 2005 Author Share Posted August 2, 2005 Truffle, these guys are still talking about a file, like info.txt, or maps.txt, etc. Just writing it different, and setting up your own parsing functions instead of using the INI ones.Yeah I knew that part... But, what I wasnt sure about was if the CSV file gets over 64K wont I have the same problems? Only one way to find out I guess... And that's to try it.I asked about ODBC because I went in to ODBC connector and saw that CSV and TXT files were both in the drivers list. Thought maybe Windows may handle it a little different if it were setup as a "data source" rather than just a notepad file. 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