• 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: problem to make file with System Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem to make file with System Events


  • Subject: Re: problem to make file with System Events
  • From: Stan Cleveland <email@hidden>
  • Date: Fri, 15 Oct 2010 12:23:17 -0700

On Oct 15, 2010, at 9:29 AM, KOENIG Yvan wrote:

Hello

I got an annoying behavior .

Under 10.4.11, I used a handler which behaved flawlessly.
Now, as my G5 died, I'm running 10.6.4 on my imac.

The handler fails.

Here it is :
<snip>
set dest to dossier & nomZip
--> "Macintosh HD:Users:yvankoenig:Desktop:azertyk_20101015-162446.pages.zip"
tell application "System Events"
if exists disk item dest then delete disk item dest
(* worked under 10.4.11 bu fails under 10.6.4 *)
--make new file at end of folder dossier with properties {name:nomZip, kind:"ZIP archive"}
(* under 10.6.4, I tried this syntax but it faills too *)
--make new file at end of folder dossier with properties {name:nomZip, type identifier:"public.zip-archive"}
--> error "Erreur dans System Events : Le gestionnaire AppleEvent a échoué." number -10000
(* Happily, this one does the trick *)
make new file at end of folder dossier with properties {name:nomZip}
end tell
<snip>
Happily, I may use the version which doesn't define the file kind. The system will behave flawlessly without it.
But I'm wondering why the instruction setting the type identifier fails with the "new" system.

I hope that some one here may bring some light.

Hi Yvan,

OMM under 10.6.4, the dictionary for "System Events" shows the "kind" property to have "get" access only, not "get/set". Here on another machine running 10.4.11, "kind" is shown as "read only". 

Under 10.6.4, the "Finder" dictionary also shows "kind" as "get" access only. Under 10.4.11, "Finder" has no "kind" property, only "file type" and "creator type", both of which are listed as "read/write".

That you could set the "kind" under 10.4.11 is a mystery that runs contrary to the dictionary, at least on U.S. English systems. Either it did nothing and failed silently or, very unlikely, the 10.4.11 French OS actually supported "set" access. Can you check your 10.4.11 dictionary for "System Events"?

Stan C.

 _______________________________________________
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: 
 >problem to make file with System Events (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: problem to make file with System Events
  • Next by Date: Re: problem to make file with System Events
  • Previous by thread: problem to make file with System Events
  • Next by thread: Re: problem to make file with System Events
  • Index(es):
    • Date
    • Thread