ChooseFolderDialog on 10.13.5


#1

ChooseFolderDialog works perfectly for me on El Capitan, but on 10.13.5 I’m getting nothing from it. The binary appears to change with various choices, but I can never get a result. Can anyone else confirm that it’s the OS and not some other factor?

Global gvTestPath, gvShow
ChooseFolderDialog gvTestPath
gvShow = pathstr(gvTestPath)
ShowVariables gvTestPath, gvShow


#2

Works fine in 10.13,4 but I have not yet installed 10.13.5. Waiting to see if there are any problems with that version before installing.


#3

Using 10.13.5, I too get nothing.


#4

In Panorama 6, the ChooseFolderDialog statement works by running an AppleScript. Here’s the code.

try
    set thisFolder to choose folder
on error
    return "User clicked cancel"
end try
tell application "System Events"
    return id of thisFolder
end tell

So Jim or Robert, it would be interesting to know if this code runs correctly in Script Editor on 10.3.5.

Some other statements that use AppleScript include CURL, REVEALINFINDER, LISTLONGFILES and MACOSCOMPUTERNAME. Do any of those work? Question is, is there a problem specific to the AppleScriptCode in ChooseFolderDialog, or are AppleScripts in general broken? (I hope not the latter.)


#5

It does. I ran the script and chose the Scripts folder. The result was

"Scripts,-100,7405403"

#6

I got similar results on El Capitan and on 10.13.5:
"Jobs,-100,714777"

That would be why I’m seeing the binary result of ChooseFolderDialog change. Yet I can’t make use of it. It gets treated as if the result is empty.

On Pan X it’s working as it should.


#7

I misunderstood this, I thought the dialog wasn’t appearing at all.

It sounds like the System Events application is not returning the correct value. If so, we’ll just have to hope that Apple fixes this.

Panorama X doesn’t use AppleScript for this, or anything else. It’s using a native Cocoa API call, so that’s why it is not affected by this problem.