• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: file "locked" property...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >file "locked" property... (From: Jean-Christophe Helary <email@hidden>)
 >Re: file "locked" property... (From: "email@hidden" <email@hidden>)
 >Re: file "locked" property... (From: Jean-Christophe Helary <email@hidden>)

  • Prev by Date: Re: Double Tell - Tell by Variable Question
  • Next by Date: Re: file "locked" property...
  • Previous by thread: Re: file "locked" property...
  • Next by thread: Re: file "locked" property...
  • Index(es):
    • Date
    • Thread