Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BaldwinSoft

macrumors newbie
Original poster
Apr 24, 2011
1
0
Hi Guys,

While in the middle of working on an application I decided to upgrade to xcode 4. However, I soon learned that Xcode 4 no longer supports applescript applications, so I made the switch over to an ASOC application. Everything has went well expect for the search bar; I can't for the life of me get the search bar to take the text entered and put it into a variable. Any help to get this sorted out would be much appreciated.
Thanks,
Ian

Code:
on end editing theObject
	set song to content of text field "search" of window "Advanced"
	try
			tell application "iTunes" 
                play first item of (search first library playlist for (song))
            end tell
	on error
		display dialog "Song not found. Please make sure that you enter the correct title of the song." buttons {"Ok"} with icon 2 default button "Ok"
	end try
end end editing
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.