Hello,
I have a Programm with the function to create folders
So you can check if you need this or that folder.
And to use that I used properties with bindings like:
AppleScript
property checkbox : true
Now when the checkbox in Xcode is bounded to checkbox I can see that the checkbox is off. But when I check the checkbox the Programm don't recognize it. And don't make a folder.
Applescript
if checkbox is true then
make new folder at desktop with properties {name:"My Files"}
end if
Thanks for your support! 💻/
Post
Replies
Boosts
Views
Activity
Hello,
This is my code:
AppleScript
on startButton_(sender)
set folderDestination to choose folder
log folderDestination
log nameOfFolder
tell application "Finder"
make new folder at folderDestination with properties {name:nameOfFolder}
end tell
end startButton_
The idea ist to make a folder at the folder Destination (folderDestination) with the name of the folder (nameOfFolder).
This is the error from the console:
language
2021-03-13 09:28:02.844240+0100 Folder Creator[1571:39314] *** -[AppDelegate startButton:]: Finder got an error: Can’t make «class ocid» id «data optr0000000059FEE7F626C77C59» into type Unicode text. (error -1700)
But the log from the folder Destination and name did work:
language
2021-03-13 09:28:02.750713+0100 Media Folder Creator[1571:39314] file:///Users/name/Desktop/
and:
language
2021-03-13 09:28:02.753207+0100 Media Folder Creator[1571:39314] folderName123
The textfield in Xcode is connected to nameOfFolder.
Model Key Path: nameOfFolder
I do not know where the error is.
Thanks for your help.
Hi,
I have a Problem. Really... ☺️
Is there a way to change the value of a property that you can see the new value in a Label?
This works:
AppleScript
property myValue : "Yes"
set myValue to "No"
log myValue
But when I bind myValue to a Label in my project, I can only see "Yes" in the Label.
Hey,
I don't know anything about swift but only about shell. That is why I ask here.
My plan is to make an Application where you push a button to activate this script:
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1
I know, very simple.
But how I can I make this? Thank you.