Launch - wait 15secs - issue "Command/U" key combo?

I apologize but I simply don’t know how to do the following. Can anyone lend me a hand with this?

I simply need a script that will launch an application. Then, after 15 seconds, issue a "Command - U " key combination.

Any help would be greatly appreciated.

Most sincere thanks to all,
Rob

try this…

tell application "AppName" to activate
delay 15
tell application "System Events" to tell process "AppName"
	keystroke "u" using {command down}
end tell

Tom

Browser: Safari 528.17
Operating System: Mac OS X (10.5)

Wow Tom!

Thank you soooo much. That really helps me out a lot!

Can I ask you one other quick question? How can I modify the line: keystroke “u” using {command down}
to be the “forward arrow i.e. right pointing arrow” instead of the " u " key?

in other words a "Command - (right arrow) " key combination? Is that possible?

Thanks again!!
Rob

You’re most welcome, Rob. This should do it…

tell application "AppName" to activate
delay 15
tell application "System Events" to tell process "AppName"
	keystroke (ASCII character 29) using {command down}
end tell

Tom

I certainly never would have figured that one out.
Thanks again!!!

cheers,
Rob