on timeout inside of an if else.... statement

hey people, I was wondering if I can get the on timeout to work inside of a(n) if else statement and display a dialog, then after a certain number of seconds - it will close. Is there any way to do that? PM/Email me if any questions arise.

Thanks ahead of time
~curtranhome

Model: Power Mac
Browser: Safari 531.9
Operating System: Mac OS X (10.4)

Is this what you’re looking for ?

set ShortTime to true

if ShortTime then
	set theTimeOut to 2
else
	set theTimeOut to 4
end if

display dialog "..." giving up after theTimeOut

yes, this is exactly what i needed, thank you :slight_smile:

Just so you know, this isn’t a place to put you applescript questions. This is a place to post applescripts.