I have scoured the internet to figure this out and had now luck. I have found a workaround by using the quit handler. This makes it so when you try and quit the "on idle" app you get a menu that can lead you to other options instead of quitting.
**** This is my first post, and I don't know how to post script. If someone tells me I'll make this show correctly.*****
on quit
display dialog "Do you want to delay instead?" buttons {"Yes", "No"} default button {"No"} giving up after 10
if result = {button returned:"Yes", gave up:false} then
GoToDelay()
else
continue quit
end if
end quit
on GoToDelay()
display dialog "How long do you want to delay for?" buttons {"5 Minutes", "10 Minutes", "15 Minutes"} giving up after 7 with title "VPN Application Delay Options."
if result = {button returned:"5 Minutes", gave up:false} then
set delay_time to 5 * 60
else if result = {button returned:"10 Minutes", gave up:false} then
set delay_time to 10 * 60
else
display dialog "Delay Canceled" giving up after 7 buttons {"Ok"} with title "VPN Application Delay Options"
set delay_time to 10
end if
end GoToDelay