Re: file "locked" property...
Re: file "locked" property...
- Subject: Re: file "locked" property...
- From: Yvan KOENIG <email@hidden>
- Date: Thu, 25 Jun 2015 15:50:08 +0200
Le 25/06/2015 à 15:20, Jean-Christophe Helary < email@hidden> a écrit :
I'm using 10.10.3 as well and your code produces the following error:
error "Finder got an error: Can’t set file \"Mabinogion:Users:suzume:Desktop:locked_unlocked.rtf\" to true." number -10006 from file "Mabinogion:Users:suzume:Desktop:locked_unlocked.rtf"
and the highlighted part of the code is:
set locked of file tFile to true
Jean-Christophe
To run the code, you are supposed to have a file named locked_unlocked.rtf on your desktop. The error which you got is stating that the file doesn't exists. From my point of view moving one instruction would be cleaner because path to desktop folder isn't a Finder's feature but a Standard Additions one.
set tFile to ((path to desktop folder) & "locked_unlocked.rtf") as string # MOVED
tell application "Finder"
--- locked
set locked of file tFile to true
--- unlocked
set locked of file tFile to false
end tell
Yvan KOENIG (VALLAURIS, France) jeudi 25 juin 2015 15:50:04
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden