Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 7, 2006, 08:59 AM   #1
Mackey
macrumors newbie
 
Join Date: Apr 2006
Location: NJ
Sorting Arrays in AppleScript / Losing Classic OSAX

Now that I’ve had to abandon some beloved classic OSAX, I’m searching for new answers. Does anyone know if there is an easy way to sort arrays of lists in AppleScript or via an OSAX? For example, I would like to be able to sort this array by either the text value or the number value:
{{“Dinner Music”, 27}, {“Bedtime Music”, 38}, {“Party Music”, 47}}

Some of the old OSAX would also let you do things like turn that array into
{“Dinner Music”, “Bedtime Music”, “Party Music”}
or
{27, 38, 47}

Does anyone have recommendations for OSAX that perform similar operations?
Thanks,
__________________
Chris
20" Intel iMac, 2GB, EyeTV 250; G4 DP 1.42 GHz, 1.5 GB, Plextor ConvertX PVR; G4 533, 1.5 GB; G4 TiPB 15"; Beige G3 400; Win98 Dell Hunkojunk
Mackey is offline   0 Reply With Quote
Old Jul 8, 2006, 08:20 AM   #2
slooksterPSV
macrumors 68030
 
Join Date: Apr 2004
Location: Nowheresville
Send a message via AIM to slooksterPSV Send a message via MSN to slooksterPSV Send a message via Yahoo to slooksterPSV
I don't know much about AppleScript, but I did find this example in the AppleScript Studio. Here it is, it actually is part of an XCode example, but part of that program is actually an AppleScript. Here is the code in AppleScript. Doesn't mean anything to me, but maybe it does to you.
Code:
	make new data column at end of data columns of theDataSource with properties {name:"city", sort order:ascending, sort type:alphabetical, sort case sensitivity:case sensitive}
__________________
AMD Phenom 9600, 2GB RAM, 250GB HDD, ATI Radeon 4850, Vista Home Premium 64-bit
Gateway NV53 with Windows 7 Home Premium 64-bit & Ubuntu 10.04 Lucid Lynx 64-bit
slooksterPSV is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Please Help with arrays Bigred101 Mac Programming 7 Mar 13, 2014 07:39 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 28, 2013 11:38 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Applications and Mac App Store 0 Oct 28, 2013 11:32 PM
sorting a list of dates and times (applescript) wild4life2013 Mac Programming 2 Sep 6, 2013 08:02 PM
arrays of structs farmerdoug Mac Programming 3 Feb 7, 2013 01:47 PM

Forum Jump

All times are GMT -5. The time now is 03:52 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC