Controlling Your Mac with AppleScript and Java
Subject:   Wrap the tell in a timeout seems to fix the hang
Date:   2004-12-16 15:00:12
From:   mikevh
I found a solution written here

You wrap the tell in a timeout block to fix the hanging issues, its the only thing thats worked for me.