Autostart

Hello,
how i can autostart the script, if insert some devices such as USB flash, ir MicroSD??