InDesign CS2: bundling with Finder

I have a script processing my publication written in JavaScript but I’d like to add some more functionality utilizing mac OS features
For exaple I’d like that folder containing my publication after script complete will colored in green

In Adobe Script Editor all work fine - first JavaScript processed, then swithed to appleScript –

… here goes JaveScriptCode…
app.doScript(appleScriptCode, ScriptLanguage.applescriptLanguage)

But launching the script thru InDesign Script palette results in no applescript code processed. Where I’m wrong?
It seems like InDesign waiting for its own instructions written in different language – so, if it’s true, how can I switch to OS X Finder?