Xcode 4 ASOC Search Bar

Discussion in 'Mac Programming' started by BaldwinSoft, Apr 24, 2011.

  1. BaldwinSoft macrumors newbie

    Apr 24, 2011
    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.

    on end editing theObject
    	set song to content of text field "search" of window "Advanced"
    			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

Share This Page