hide invisible files from the choose file dialog?

I’ve been trying to get a dialog box that just selects programs, and doesn’t show invisible files.

set new to choose file with prompt "Select the Download Application to keep open"

i’ve tried

 
set new to choose file with prompt "Select the Download Application to keep open" ignoring invisible
set new to choose file of type visible with prompt "Select the Download Application to keep open" 
set new to choose file of type {"app"} with prompt "Select the Download Application to keep open" 

and several variations of the above. the first refuses to compile.
the others run fine, but don’t hide the invisibles.
I don’t particularly want to use the Applications List dialog simply b/c it takes too long to open, and it’s as messy as my invisible files. any help would be appreciated

10.2.8

thanks. adding “without invisibles” confused it. it thinks “invisibles” is a variable, but (of type {“APPL”}) worked to hide invisibles.

Jacques’ suggestions all work fine here, pilothigh. I believe the issue is simply the version you’re currently working with - which I see is Mac OS 10.2.8. That should mean you’re using AppleScript version 1.9.1. (I stuck with this combination for a long time myself.)

IIRC, the invisibles parameter, which specifies whether invisible files and folders should be displayed when using the choose file and choose folder commands, wasn’t introduced until AS version 1.9.2 (Mac OS X version 10.3). So I’m afraid you’ll have to wait for your next upgrade before you can take advantage of it.

(Just something else to look forward to…) :slight_smile:

A quick check of the AppleScript release notes confirms this.

Good to know the ol’ memory still works. sometimes. :wink: