Hey
How do I get an open panel (for choosing a file or folder) in AppleScriptObjC (Cocoa-Applescript)??
In Applescript Studio I used to do like this:
tell open panel
set treat packages as directories to false
set can choose directories to false
set can choose files to true
set allows multiple selection to false
set prompt to "Select file"
end tell
set theNameTextField to theName
set thePathTextField to thePath
display open panel in directory theDesktopPathPOSIX for file types {theType} attached to window "main"
As far as I can figure out, I have to use NSOpenPanel, but how do I get this to work?
Please help, thanks