5

I wrote an AppleScript to mount a bundled sparse disk image. I want this script to be executed exactly when Time Machine launches.

I can check if Time Machine is running with on idle statement,

on idle
    ....
    return <interval>
end idle

but I'm pretty sure, it isn't a robust way to do that.

IMO making an event trigger for Application Launch event would be a better approach.

I appreciate if someone can help me.

3

You can use a LaunchAgent (see Lingon) to perform an action when a file is modified. Time Machine has some file somewhere that it modifies each time it starts.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .