0

My applescript's app name is "myApp", I'm just wondering why it's not killing my app after the Launch of Tableau.

"on run" is working as expected, and killing the host app after launching Tableau, but "on open" is not behaving as expected, when I'm passing clicked filename as parameter:

on open fileRef
    do shell script "/Applications/Tableau\\ Desktop\\ 2019.1.app/Contents/MacOS/Tableau -DConnectPluginsPath=/Users/myUser/Downloads/connector " & quoted form of POSIX path of fileRef & " killall myApp"
end open

on run
    do shell script "/Applications/Tableau\\ Desktop\\ 2019.1.app/Contents/MacOS/Tableau -DConnectPluginsPath=/Users/myUser/Downloads/connector & killall myApp"
end run

Thanks.

1 Answer 1

0

That was a silly mistake, I was not putting an '&' before " killall myApp" in "on open"

Correct version is as follow:

on open fileRef
    do shell script "/Applications/Tableau\\ Desktop\\ 2019.1.app/Contents/MacOS/Tableau -DConnectPluginsPath=/Users/myUser/Downloads/connector " & quoted form of POSIX path of fileRef & " & killall myApp"
end open

on run
    do shell script "/Applications/Tableau\\ Desktop\\ 2019.1.app/Contents/MacOS/Tableau -DConnectPluginsPath=/Users/myUser/Downloads/connector & killall myApp"
end run
1
  • Glad you found a solution! Once possible, if you could mark your answer as correct, it'll close the question.
    – JMY1000
    Jul 8, 2019 at 7:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .