PDA

View Full Version : Xcode 4 ASOC Search Bar




BaldwinSoft
Apr 24, 2011, 03:45 PM
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


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