Delay vs Return

If i want to pause script for few minutes using on idle…end idle, which one i should use? I dont want that script uses any extra processor cycles.

on idle
	delay 300
       --or
	return 300
end idle

What if i want to use delay outside of on idle…end idle. Is there any better way than delay?

For relatively long delays like 300, the most efficient “pauser” is:

do shell script "sleep 300"

It doesn’t put the machine to sleep, it just pauses for 300 seconds before responding.

This doesn’t seem to work for me. I have another script that won’t delay in Snow Leopard for some reason.

This doesn’t work

display dialog "You are cool"

do shell script "sleep 5"

display dialog "yes sir"

But this does

display dialog "You are cool"

Delay 5

display dialog "yes sir"

To Skillet

The first one of your examples works fine for me in Snow Leopard 10.6.4.

Maybe you have an issue somewhere in your system?