Select Dependencies

Hi all,

is it possible to write a script that will activate upon opening the Select by name tool?

I basically want a script that will run when this button is pressed, and if "Select Dependencies" is ticked, it asks you if you want to leave it activated or turn it off.

I'd like this because i often sit around waiting for ages for my machine to filter hrough everything and work out whats dependant ect. I end up forcing max to close, especially if i type * first so max then has to filter through everything!