Preventing Timeout Error Display in AppleScript Studio App

Hey there,

I have an AppleScript Studio app that has some Display Dialog bits of code that ask the user for some input (a button click, text, whatever). Now, I can lengthen the timeout length…put it to 10 minutes, whatever. But is there a way to surpress the error that pops up when it does finally timeout. I tried to put the code in a Try block but that doesn’t seem to help.

Any ideas?

Cheers.

Hey man,

you’re working with AppleScript Studio!!!
It has incredibly better alternatives for data input than a miserable display dialog window

:wink:

That my friend is very true! But I originally wrote everything in vanilla AppleScript and just quickly put it into AppleScript Studio (because I have one interface NIB that I want to have always present). I didn’t build the other interface pieces…in part because in a few of them, the window would have a lot of columns and stuff that I don’t know how to do that well in XCode.

I’m experimenting with something though that seems to be working… am I going in the write direction?

Below is only a small part of the script…



try
					with timeout of 600 seconds
						
						set theFolderName to (choose from list theFinalNames with prompt "Move to which User's Edit folder?") as text
						if theFolderName is "false" then error number -128
					end timeout
				on error
					error number -128
				end try



Cheers

The code above prevents the error message, but it would be good to just close the display dialog, because it currently, remains open but doesn’t work anymore.