home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Modified by Roger Gouin 12/19/98
- // Print files in sorted order - can use with FinePrint for more than one
- // file on a page.
-
- function DoCommand()
- {
- var fileList = chooseFiles("Files to print", "*.*", "*.*");
- if (!fileList) return;
-
- fileList.sort(compareItems);
- var position = fileList.getHeadPosition();
- while (position && position.valid)
- {
- var file = fileList.getNext(position);
- var editor = openEditor(file.path, false);
- if (editor)
- {
- editor.print();
- }
- }
- }
-
- function compareItems(itemA, itemB)
- {
- // Assumes itemA and itemB are Association objects
- itemApath = itemA.path.toLowerCase();
- itemBpath = itemB.path.toLowerCase();
- if (itemApath < itemBpath) return -1;
- if (itemApath == itemBpath) return 0;
-
- return 1;
- }
-
- !!/Script
-
-