Sending a return (ascii(10)) to the frontmost window

Hi,

I have a segment of applescript on osx I’m attempting to tweak. The situation as it exists
immediately before I’d like the action to occur is: Virtual PC is open with Windows XP Pro.

What I want to do is send a ‘return’ to that application/window. Without using applescript, if
the VirtualPC window is up and is the frontmost window, my hitting return on the keyboard
accomplishes what I want to happen. I just want to do exactly that, in code.

(More detail: on the Windows XP desktop there is a popup window saying, “are you sure”.
The default answer is ‘yes’, which is what I want.)

So, I want the ‘return’ to be targeted towards VirtualPC itself, and not any particular
application within it, if thats possible.

Below I have several trial chunks I’ve used, but none are working.

Thanks,
Rob

–tell application “System Events” to tell application “Virtual PC”
– keystroke (ASCII character (10))
–end tell

tell application “Virtual PC”
activate
delay 2
tell application “System Events” to keystroke (ASCII character (10))
end tell

–tell application “System Events” to keystroke (ASCII character (10))

–tell application “System Events” to tell application “Virtual PC”
– keystroke (ASCII character (10))
– delay 10
– keystroke (ASCII character (10))
– delay 5
–end tell

Never mind, a friend pointed out it should be ascii(13), and it works.