Re: Delete
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
References: | |
| >Delete (From: "R. Nelson Byrne" <email@hidden>) |