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.

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
| improve this answer | |
  • Glad you found a solution! Once possible, if you could mark your answer as correct, it'll close the question. – JMY1000 Jul 8 '19 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.