Dieuz Posted December 21, 2009 Share Posted December 21, 2009 Hi, Is there anyway to sort an array by alphabetical order ? I know that the _ArraySort let you sort an array with numbers, but what about letters? Thanks, Link to comment Share on other sites More sharing options...
Fire Posted December 21, 2009 Share Posted December 21, 2009 May be you mean this?_ArrayMin() [optional] Comparison method:$iCompNumeric =00 - compare alphanumerically1 - compare numericallysee the help file: about _ArrayMin() and _ArrayMaxandhttp://www.autoitscript.com/forum/index.php?showtopic=107123 [size="5"] [/size] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 21, 2009 Moderators Share Posted December 21, 2009 (edited) Hi,Is there anyway to sort an array by alphabetical order ? I know that the _ArraySort let you sort an array with numbers, but what about letters?Thanks, I believe you could have answered this question for yourself just by looking in the help file at the example there ( or taking a few seconds to test that yourself ) ...Edit:Seems the helpfile example may have changed ( or my memory sucks, could have swore it had the Jon/Valik/JPM/Jos/Etc example there before ).So the answer is yes, it can sort alpha or numeric. Edited December 21, 2009 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
jchd Posted December 21, 2009 Share Posted December 21, 2009 Is there anyway to sort an array by alphabetical order ? I know that the _ArraySort let you sort an array with numbers, but what about letters?What makes you believe that _ArraySort is limited to sorting arrays populated with numbers?I mean, what did you try that doesn't work? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Dieuz Posted December 21, 2009 Author Share Posted December 21, 2009 (edited) Alright, I thought it was only for numbers. My bad then Thanks! Edited December 21, 2009 by Dieuz Link to comment Share on other sites More sharing options...
Dieuz Posted December 21, 2009 Author Share Posted December 21, 2009 (edited) HOLY COW! Just tried the function with an array full of words from a text file and it deleted ALL the words in my text files. I did not do any backup. What can I do to UNDO this? PLEASE HELP! Edited December 21, 2009 by Dieuz Link to comment Share on other sites More sharing options...
jchd Posted December 21, 2009 Share Posted December 21, 2009 HOLY COW! Just tried the function with an array full of words from a text file and it deleted ALL the words in my text files. I did not do any backup. What can I do to UNDO this???? Undo what?_ArraySort sorts an array, that is elements in memory. How could this delete a disk file, please?Having no backup is about giving a loaded gun to a monkey sitting in front of you. FYI hard disk drives happen to fail without warning you. Five seconds before dying he was well alive... This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 21, 2009 Moderators Share Posted December 21, 2009 As stated, _ArraySort() does nothing to a file. Did you happen to use FileOpen() with the 2nd parameter of 2? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Dieuz Posted December 22, 2009 Author Share Posted December 22, 2009 (edited) As stated, _ArraySort() does nothing to a file. Did you happen to use FileOpen() with the 2nd parameter of 2?Unfortunately yes... I am screwed right? Edited December 22, 2009 by Dieuz Link to comment Share on other sites More sharing options...
Authenticity Posted December 22, 2009 Share Posted December 22, 2009 Probably, check to see if you have a system restore point where the file was in it's previous state. Nothing is promised though. Link to comment Share on other sites More sharing options...
Dieuz Posted December 22, 2009 Author Share Posted December 22, 2009 Probably, check to see if you have a system restore point where the file was in it's previous state. Nothing is promised though.Oh, Thanks Great Idea!Ill check this out! Link to comment Share on other sites More sharing options...
jchd Posted December 22, 2009 Share Posted December 22, 2009 Unfortunately yes... I am screwed right?You can try some "undelete" or "recovery" program around, but no guarantee. Obviously you _will_ already have stopped using this machine, since doing anything can overwrite the location on disk where your file was sitting. Note that even if you do not use it, Windows can have background tasks running that can have the same unwanted effect (re-indexing, defragmenting, a.s.o.).If your data is of any significant value or needs real efforts to re-create, your best bet is stop this machine asap, use another computer in the meantime and plug the offending hard disk in this second machine with auto-indexing off, then backup the partition (plenty of tools around) and try whatever recovery utility you find. Otherwise, download the "ultimate boot cd" (using another PC) and boot with that. There are tools for doing various things, but most of them need good grasp of underlying technical details.Best of luck. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) 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