John, The script still fails. I think that it is related to a change in AppleScript on Snow Leopard. The following almost works: set appPath to path to me set gnc_fq_update_alias to path to resource "gnc-fq-update" in bundle appPath set gnc_fq_update to (POSIX path of gnc_fq_update_alias) tell application "Terminal" do script "sudo " & quoted form of POSIX path of gnc_fq_update end tell But fails after opening a terminal and I type my root password with sudo: /Applications/Intel/FinanceQuoteUpdate.app/Contents/Resources/gnc-fq-update: command not found because gnc-fq-update is an alias to /Users/john/Gnucash Intel 2.3.10/Gnucash.app/Contents/Resources/bin/gnc-fq-update (which I'm assuming is the path to GnuCash on your machine). So I deleted the alias and then made a symbolic link in the terminal: > cd /Applications/Intel/FinanceQuoteUpdate.app/Contents/Resources > rm gnc-fq-update > ln -s ../../../Gnucash.app/Contents/Resources/bin/gnc-fq-update . Then double clicking the FinanceQuoteUpdate in the finder brought up the terminal and after typing the root password, starting pulling from CPAN. Can you embed a symbolic link in a bundle? Or, can you manipulate paths in AppleScript to look in the GnuCash bundle and not the FinanceQuoteUpdate? Vince On Mar 4, 2010, at 2:03 PM, John Ralls wrote:
|