CheckModifierKeys and ⌘S (command save)

Hi,

Have been experimenting with intervening in the Save process of Microsoft “Word”; At the moment the Command Save keystroke combination is my interest.

The script below -put together from previous posts, mainly from this site- seems to work. However it appears to be somewhat slow and so may not be 100%

Could it be configured to respond faster ? I am very new to scripting so there may well be some completely different option.

However I did come across, on this site, the command line tool checkModifierKeys put together by, one of your GrandMasters, StefanK.

The response to checkModifierKeys is instantaneous when say shift/option is used as a substitute for command save .

I was wondering whether or not exists a similar command line tool to checkModifierKeys that would respond to say a combination of a letter (like s) and a modifier key (like command) ?

on run
	tell application "KeyboardViewerServer"
		activate
		set visible to false
	end tell
	--set mynewLet to theFle as string
	--set MyFile to name of (info for theFle)
	--set appName to etc etc
end run

on idle
	--set mynewLet to theFle as string
	--set MyFile to name of (info for theFle)
	--set appName to etc etc 
	tell application "System Events"
		if ((get value of checkbox "⌘" of first window of application process "KeyboardViewerServer") as number) = 1 and ((get value of checkbox "s" of first window of application process "KeyboardViewerServer") as number) = 1 then
			tell application "Microsoft Word"
				if (get name of active document) is  MyFile then
					display dialog ("Do you want to save the changes you made to " & " \"" & MyFile & "\"?"") with title ("Save your Document Here") buttons {"Don't Save", "Cancel", "Save"} default button "Save"
				end if
			end tell
		end if
	end tell
	return 0.01
end idle

Model: iMac8,1
AppleScript: 2.3 (118)
Browser: Safari 531.22.7
Operating System: Mac OS X (10.6)

set visible to false

In the “on run” set visible to false should be deleted