How to launch Mac application after download

Ask for help and report issues with the Mac OS X version of Transmission
Post Reply
tbharber
Posts: 4
Joined: Tue Mar 01, 2011 3:18 am

How to launch Mac application after download

Post by tbharber »

I am trying to use the "Call script when download completes" feature to launch an application when my download completes. I have created a simple script with the following code:

Code: Select all

#!/bin/sh
{
open /Users/Tim/Desktop/Convert.app
} &
The problem is the application never launches when the script is called. The script works fine when being launched from the Terminal but does not work when Transmission completes the download.

I went in the log and see where the script is being called when the download finishes but for the life of me cannot figure out why my application will not load. Any ideas guys?
tbharber
Posts: 4
Joined: Tue Mar 01, 2011 3:18 am

Re: How to launch Mac application after download

Post by tbharber »

BUMP!

Still cannot figure this one out. Anyone have any thoughts on how to launch a Mac application when downloads finish?
xenedar
Posts: 43
Joined: Wed Oct 24, 2007 6:08 pm

Re: How to launch Mac application after download

Post by xenedar »

Some hints that might work.

1. Make sure the script is executable. Type:

Code: Select all

chmod 755 /path/to/script.sh
2. Try removing the braces "{}". Something like:

Code: Select all

#!/bin/bash
open /Applications/Calculator.app
Worked for me. My latest torrent finished and Calculator opened.
tbharber
Posts: 4
Joined: Tue Mar 01, 2011 3:18 am

Re: How to launch Mac application after download

Post by tbharber »

God Damn xenedar you nailed it. Did the chmod to the script and it worked like a charm. I did not think this was necessary because it ran fine in the Terminal but it worked. I have been looking into this for weeks and this is the first suggestion that I have seen that has worked.

Thanks a ton!
Post Reply