Show hide side bar working slowly

Hi.

I wrote a simple script that showss/hide the Finder side bar.

I saved it as application, I’ve pasted an icon, and I’ve dragged to Finder window toolbar, so with a simple click is it possible to show/hide Finder side bar.

It’s working but:

It is slow
It shows a kind of window flash.

I want to improve it.

Thanks in advance.

activate application "Finder"
tell application "System Events"
	tell process "Finder" to tell window 1
		keystroke "s" using {command down, option down}
	end tell
end tell

Set your 'application bundle" to run in the background…

http://scriptbuilders.net/files/ibackgroundscripts1.4.html

Operating System: Mac OS X (10.6)