on get_input()
display dialog ("Create or view a playlist of all the tunes") ¬
& (" in your iTunes library having a common theme.") & return & return ¬
& ("Enter the theme as a word or phrase:") ¬
default answer "" buttons {"Cancel", "View", "Create"} default button "Create"
return result
end get_input
Should i not see a dialog box when i run the script ?
get_input() of me
on get_input()
display dialog ("Create or view a playlist of all the tunes") ¬
& (" in your iTunes library having a common theme.") & return & return ¬
& ("Enter the theme as a word or phrase:") ¬
default answer "" buttons {"Cancel", "View", "Create"} default button "Create"
return result
end get_input
If you have currently frontmost application not Script Editor, but some other app, then display dialog window will remain on the background. As here:
tell application "Safari" to activate
get_input() of me
on get_input()
display dialog ("Create or view a playlist of all the tunes") ¬
& (" in your iTunes library having a common theme.") & return & return ¬
& ("Enter the theme as a word or phrase:") ¬
default answer "" buttons {"Cancel", "View", "Create"} default button "Create"
return result
end get_input
To fix the problem, you should make Script Editor frontmost before calling the handler:
tell application "Safari" to activate
tell me to activate
get_input() of me
on get_input()
display dialog ("Create or view a playlist of all the tunes") ¬
& (" in your iTunes library having a common theme.") & return & return ¬
& ("Enter the theme as a word or phrase:") ¬
default answer "" buttons {"Cancel", "View", "Create"} default button "Create"
return result
end get_input