• 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: Delete
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete


  • Subject: Re: Delete
  • From: André Renault <email@hidden>
  • Date: Wed, 18 Aug 2010 20:39:09 -0400

System Events does not accept alias. Suffix "as string", like this:
tell app "System Events" to delete (alias "A:K:A:" as string)
On Aug 18, 2010, at 8:02 PM, R. Nelson Byrne wrote:

> Here's my script:
>
> alias "Hard Time:Desktop Folder:DATAFILE.pdf" returning aFile
> tell application "Finder" to get size of aFile
> tell application "System Events" to delete aFile
>
>
> When I run it, the log shows:
>
> tell application "Finder"
> 	get size of alias "Hard Time:Desktop Folder:DATAFILE.pdf"
> 		156269
> end tell
> tell application "System Events"
> 	delete alias "Hard Time:Desktop Folder:DATAFILE.pdf"
> 		"System Events got an error: Can’t make alias \"Hard Time:Desktop Folder:DATAFILE.pdf\" into type reference."
>
>
> Why can't I delete this file (which I know exists, the Finder tells me so.)
>
> Regards,
>
>
> R. Nelson Byrne _______________________________________________
> 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

 _______________________________________________
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

  • Follow-Ups:
    • Re: Delete
      • From: Axel Luttgens <email@hidden>
    • Re: Delete
      • From: Alex Zavatone <email@hidden>
References: 
 >Delete (From: "R. Nelson Byrne" <email@hidden>)

  • Prev by Date: Delete
  • Next by Date: Re: Delete
  • Previous by thread: Delete
  • Next by thread: Re: Delete
  • Index(es):
    • Date
    • Thread