Jump to content

Sort Array by Alphabetical Order


Dieuz
 Share

Recommended Posts

May be you mean this?

_ArrayMin()

[optional] Comparison method:

$iCompNumeric =0

0 - compare alphanumerically

1 - compare numerically

see the help file: about _ArrayMin() and _ArrayMax

and

http://www.autoitscript.com/forum/index.php?showtopic=107123

[size="5"] [/size]
Link to comment
Share on other sites

  • Moderators

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 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

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 here
RegExp tutorial: enough to get started
PCRE 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

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 by Dieuz
Link to comment
Share on other sites

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 here
RegExp tutorial: enough to get started
PCRE 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

  • Moderators

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

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 here
RegExp tutorial: enough to get started
PCRE 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...