Why won't my AppleScript run as a Service?
Solution 1:
This is weird, but I have seen at least three people on Apple Support Communities who had this problem when a of process "x"
and a tell application "System Events" to
are on the same line.
Try this.
on run {input, parameters} tell application "System Events" tell process "TextWrangler" to set visible to not visible end tell end run