floyd Posted December 28, 2004 Report Share Posted December 28, 2004 (edited) This macro generates and calls a VBS script to sort a single dimension array of words or numbers. The resulting sorted array is written back to Macro Express in the form of a string. It is meant to show the different features of the generated QuickSort algorithm, which converts a string of elements to be sorted into an array. Each element is separated by a delimiter character, or string of characters, that you specify. There are two sample strings built in to this example macro. A string of words and a string of numbers. But you may create your own test strings. Because this example generates a VBS script, which in turn writes a string variable back to the macro, you only need to import the attached playable (.mxe) file into any Macro Express library (.mex) file. Nothing else is required to use the sorting algorithm. There are no external files. Sort word strings or numbers You choose the delimiter to use Sort all string elements or just some of them Choose to sort by case or to ignore case Sort in ascending or descending order The attached macro is well documented. And there is an extensive explanation in the header section. Any temporary files created by the macro in your system temp folder are erased before the macro terminates. Jan-28-2005 Made some changes to the macro concerning the Repeat Loops that follow the Program Launch command. See internal comments for details. SingleDimensionSort.zip Edited January 28, 2005 by floyd Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.