Hi !
Hope some here can help.
I have this applescript ( see below ) that saved as an application works great. However, I do send this app to other users as well and I does happen that they get an error running the app asking the user where application applet is located ? When I click edit I see that ‘Terminal’ is replaced by ‘applet’
How do I get around this ?
TIA,
Joost
script :
log myUrl
property myUrl : null
if myUrl = null then
display dialog “Please enter the url supplied to you .” default answer “”
set userValue to (text returned of result)
set myUrl to userValue as text
log myUrl
end if
set executeUrl to "javaws " & myUrl
log executeUrl
tell application “Terminal”
do shell script executeUrl
quit
end tell
Hi.
You don’t actually need the Terminal with the ‘do shell script’ command. You could simply leave out the ‘tell’ and ‘end tell’ statements. And the ‘quit’ statement, of course.
Thnx !
However, now the app asks for my administrator password each launch. Something I didn’t have before.
Any ideas ?
Hello
Try changing do shell script into do script in your applet.
. after first restoring the Terminal ‘tell’ statement, of course. ‘do script’ is a Terminal AppleScript command.
What if you give the text version to users, asking them to save it as an application ?
I tested this version with no problem.
property myUrl : null
if myUrl = null then
display dialog "Please enter the url supplied to you ." default answer ""
set myUrl to (text returned of result)
log myUrl
end if
set executeUrl to "javaws " & myUrl
log executeUrl
do shell script executeUrl
KOENIG Yvan (VALLAURIS, France) vendredi 2 août 2013 16:14:19
Of course. I was a bit terse, I hope it was understood, as his original applet. I can’t understand anything else, than that the use of do shell script, instead of do script, must cause the culprit, since then nothing really happens in the terminal-app block. It would be interesting to hear if it that fixes it.