"Sort" menu option

I've looked around and founds multiple scripts for pieces of what I'm looking for and I don't have the knowledge to combine them so I'm going to ask if someone can write me a single script to do what I want.

what I want:

The option for the player to manually rearrange both the "Skills" and "Item" lists, as well as the standard A-Z/Z-A sorting method.

A Main Menu command "Sort" to open an window which displays "Items" and "Skills".  "Items" will then open the inventory with a pop-up window with the "A-Z", "Z-A", "Manual" options.  cancelling will return to the main menu.

  "Skills" will initiate character select, then open the skills menu the same way as items.

I realize this may not be the best explanation in the world and appreciate anyone's attempt to help me out.
Sort A-Z and Z-A might be doable but I'm not sure about sort manually...

just to clarify, we choose sort from the main menu and not from the item and skills menu right?

hopefully somebody will do this for you...
Honestly, I'd prefer it as a main menu command but adding a sort feature to each the "Skills" and "items" would work fine too.  Whichever ends up being easier.

Manual Sort:

My idea for manual was to access the data array for "Items" or "Skills" and simply select 2 from each and swap their array ids.  This would of course requiring overwriting/updating the data.

Unfortunately I lack the knowledge to make this possible....if it is even possible to be done that way.
I prefer to do it in this way

sorter01.jpg


I can release the script if you want
I have this script available that I'm about to release: Pastebin Link


It allows manual sorting of items like you are asking for. It doesn't auto sort yet but it is planned.
@Fenix

I just got off a 10 hour shift and its 2:30 am so I'll check out your script later Fenix. I appreciate you posting that for me.

@theodoric

If you don't mind I'd love to check out/use your script.  It'd be a good learning tool for me on some aspects of Ruby.

Thanks for the replies!
Here, take it http://pastebin.com/B8wCSYUN

But it's only works for Item Menu, not skill ~
Finally had time to look at both scripts after a crazy week.  unfortunately I can't use them both, which was expected.

@theodoric

i do like having all those methods of sorting so I will probably utilize your script for a later project, giving credit of course.

@fenix

works great and pretty much how i wanted it, thanks!  the only thing i did notice is that if you double click on a SKILL usable from the menu, both using it or canceling the use, it stills leaves the skill selected as the first one for a swap.  is there anyway to cancel the swap selection IF its been double clicked for use?

Using items cancels the selection just fine, Skills do not.
I love this script! Thanks so much for making it! And thanks for the fix @twsauthor.

Original thread: https://forums.rpgmakerweb.com/threads/sort-menu-option.19146/