• 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: Leopard equivalent for getting disk format info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leopard equivalent for getting disk format info


  • Subject: Re: Leopard equivalent for getting disk format info
  • From: deivy petrescu <email@hidden>
  • Date: Sun, 6 Jan 2008 18:05:55 -0500


On Jan 6, 2008, at 15:51, Boonee wrote:

On 6/01/08 15:01, Boonee wrote:

> <Begin script snippet>
> tell application "Finder" to set x to the name of every disk whose
> format is UDF format
> <End script snippet>
>
> The above used to return a list of mounted UDF discs under Tiger, but
> does not return the same info under Leopard.



On 6/01/08 15:22, Axel Luttgens wrote:

Strictly speaking, the above should fetch the _names_ of mounted UDF
volumes.
This of course assumes there is at least one mounted UDF volume,
otherwise "every disk whose..." will return an empty list, and trying to
get "name of every disk whose..." then errors.


Now, I don't have UDF disks at hand, so I can't check here with such disks.
But what exactly do you mean with "does not return the same info"?


Tiger's Applescript Results: Returns a list of the names of every mounted UDF (DVD) Disk, as expected and required
Leopard's Applescript Results: "Finder got an error: Can't get name of every disk whose format = UDF format."



Does the returned info really differ under Tiger and under Leopard?
Or do you just get an error message (which one?) under Leopard?

See Above

> What is the proper method for retrieving this info under Leopard?


Perhaps could you try with the twin commands from System Events?
Since Panther, all that disk/folder/file stuff anyway tends to be moved
from the Finder to System Events.

Tried the following prior to writing to the list:
<Begin script snippet>
tell application "Finder" to tell application "System Events" to set x to the name of every disk whose format is UDF format
<End script snippet>
Result: {}



Your script, more sensible rewritten as
tell application "System Events" to set x to the name of every disk whose format is UDF format


(discard the tell Finder, it is not necessary) works here with Leopard. I do not have UDF, but tried with it and with NSF format. UDF returned an empty list and NSF returned the correct volume.

The "get info" window for the mounted UDF (DVD) disc still shows "Format: Universal Disk Format (UDF)" along with the other General info (In both Tiger & now Leopard)

My primary objective is to be able to identify by a stay-open script application when a DVD disc has been inserted and mounted, how many, and the names of the DVD discs that are mounted.

Thanks once again for your help Axel. _______________________________________________


Deivy

_______________________________________________
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: 
 >Re: Leopard equivalent for getting disk format info (From: Boonee <email@hidden>)

  • Prev by Date: Re: Leopard equivalent for getting disk format info
  • Next by Date: Re: Check if file exists fails
  • Previous by thread: Re: Leopard equivalent for getting disk format info
  • Next by thread: Re: Check if file exists fails
  • Index(es):
    • Date
    • Thread