Itunes Script Version 1

(* Applescript Version 1 *)
tell application "iTunes"
	display dialog "Insert Command" default answer "run,pause,stop,quit,etc" buttons {"enter"}
	set autoplay to (text returned of result)
	display dialog "Track Name" default answer "Must Be Exact Name" buttons {"enter"}
	set trackname to (text returned of result)
	if autoplay is "run" then
		play track trackname
	else if autoplay is "stop" then
		stop track
	else if autoplay is "pause" then
		pause track
	else if autoplay is "fast forward" then
		fast forward
	else if autoplay is "quit" then
		quit
	end if
end tell
set currentsong to trackname
display dialog "Song You Picked to play is " & currentsong buttons {"No", "Correct"}
set response to (button returned of result)
if response is "No" then
	display dialog "Please Insert a command" default answer "run,stop,pause, quit" buttons {"enter"}
	set command to (text returned of result)
	display dialog "Please Insert a Track Name" default answer "Track Name"
	set tracknamed to (text returned of result)
	tell application "iTunes"
		if command is "run" then
			play track tracknamed
		else if command is "stop" then
			stop track
		else if command is "pause" then
			pause track
		else if command is "quit" then
			quit
		end if
	end tell
end if
tell application "iTunes"
	if response is "Correct" then
		display dialog " Hope you enjoy Your Song!" buttons {"Im Enjoying the Music", "No Im Not"}
		set response1 to (button returned of result)
		if response1 is "Im Enjoying the Music" then
			display dialog "Come And Join Us on Our Site: [url=http://www.example.com]www.example.com[/url]" buttons {"Go to Website", "Later"}
			set response2 to (button returned of result)
			if response2 is "Go to Website" then
				tell application "Safari"
					activate
					do JavaScript "window.open('http://www.example.com')" in document 1
				end tell
			else if response2 is "Later" then
				display dialog "Hope you Enjoyed this application" buttons {"Yes", "No"}
				set response3 to (button returned of result)
				if response3 is "Yes" then
					display dialog "Hopefully You will enjoy on new Application Comming out soon" buttons {"Yes", "No"}
				else if response3 is "No" then
					display dialog "what would improve your experience with this application" default answer " Tell us what would improve your experience" buttons {"Sumbit"}
					set emailresponse to (text returned of result)
				end if
			end if
		else if response1 is "No Im Not" then
			stop
		end if
	end if
end tell