> here's my script:
[…]
> i want the script to: press the right arrow, press the down arrow,
> press the left arrow, and paste the contents of the clipboard.
>
> paste works fine. pressing the arrows does not. it returns the
> following error: Can't get keystroke "".
>
> any ideas?
Consider moving the insertion point programmatically when you can.
This is usually a better solution that pushing user interface events
at the application.
If you really do need to precisely send those events to the
application, you need to do so by way of the System Events application.
tell application “TextWrangler"
activate
tell application "System Events"
set leftArrow to ASCII character 28
set rightArrow to ASCII character 29
set downArrow to ASCII character 31
keystroke rightArrow
keystroke downArrow
keystroke leftArrow
end tell
paste
end tell
- Jim