attaching script to disk to open a file on it when it is loaded

I am getting nowhere. Does anybody know if there is a script that would open a specific file inside a disk as soon as I mount it to the desktop?

If no script is available would anybody have a suggestion as to how to write it?

see, I know how to just open files inside a folder

tell application "Finder"
activate
select file "x" of disk "y"
open selection
end tell

But that does not do it.

thanks

Hi,

launchd can do it. See this article

Thanks sounds complex (for me), need to read it again.

Any other suggestions anybody?

Stefan although probably a good solution I think this is a tick to difficult for me. Is there a simpler solution?

Actually this is quite simple :wink:

Hi ChangeAgent

A more graphical / user friendly way to do it, could be either:

Lingon:
Which is a GUI for launchd, which is sadly not been developed any more, but it still works just fine.
http://lingon.sourceforge.net/

or

Do Something When from Azarhi Software:
Which is something like launchd (maybe it uses it, I don’t know).
It hasn’t been updated in a long time, but I have successfully used it under 10.5.
http://www.azarhi.com/Projects/DSW/

Morning Haze, thanks.
I had found this looking for a GUI and found this but was not sure if it worked under 10.6. Does it?

Does it work flawless under 10.6? Does anybody know?