Tell Finder to launch a variable.
I have been working on an AppleScript to launch whatever application that the variable "a" equals.
Here is what I have right now:
set a to "Launch Safari"
set AppleScript'stext item delimiters to {"launch "}
set application_name to text item 2 of a
set app_launch_UI_Contents to "Launched " & application_name
tell application "Finder"
launchapplicationapplication_name
end tell
do shell script "osascript -e 'tell app \"Finder\" to say \"" & app_launch_UI_Contents & "\"' > /dev/null 2> /dev/null &"
set user_input to display dialogapp_launch_UI_Contentsdefault answer ""
When I run it, everything works except the application never launches. Can anyone tell my why and how to fix it? thank You!
MacBook Pro with Retina display, OS X Yosemite (10.10.3)