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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Using Click in AppleScript rebello95 Mac Programming 3 Nov 8, 2011 06:09 AM
Use backslash in Applescript running a Bash Shell Script rebello95 Mac Programming 12 Nov 3, 2011 01:56 PM
Sorting music in iTunes? Spacecrawler Mac Applications and Mac App Store 1 Mar 10, 2011 01:41 PM
Sort a text file in Applescript SomeoneElse Mac Programming 5 Nov 18, 2009 07:19 AM
sorting arrays of structs Chanda Mac Programming 17 Nov 26, 2008 12:05 PM


All times are GMT -5. The time now is 06:30 PM.

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

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