I tried to run a script for "indesign cs3" through "cs4 toolkit" using #target "indesign-5.0". But didn't work.
Indeed, it doesn't work. ESTK CS4 can't see InDesign CS3 and so can't target it. You can, of course, save such a script and run it from within the CS3 Scripts panel.
Retrieving data ...