how to open and app for some time?

do you know how to open an app and leave open for x time, ( seconds)
then quit the app.
thank you
I am a newby

Hi balam

alter the delay to suit the amount of seconds you require your application to be open

tell application "TextEdit"
	activate
	delay 5 --amount of time in seconds
	quit "Text Edit"
end tell