Some changes:
Is there a possibility that the checkbox in the program is off and you can turn it on?
When
property checkbox : false
the program don't create Folders.
Post
Replies
Boosts
Views
Activity
This solved the problem:
The problem is nameOfFolder is an NSString object, you have to bridge it to AppleScript by coercing it to text:
AppleScript
make new folder at folderDestination with properties {name:nameOfFolder as text}
But since you are already in the Cocoa world it would be more efficient to create the folder with NSFileManager.
AppleScript
on startButton:sender
set folderDestination to POSIX path of (choose folder)
log folderDestination
log nameOfFolder
set fileManager to current application's NSFileManager's defaultManager()
set {success, fmError} to fileManager's createDirectoryAtPath:(folderDestination & nameOfFolder as text) withIntermediateDirectories:false attributes:(missing value) |error|:(reference)
if success is false then log fmError's localizedDescription()
end startButton:
Here on stack overflow: https://stackoverflow.com/questions/66613102/applescript-create-folder-with-properties/66613251#66613251
Thank you. That helps me a lot!
Good day and stay health.