|
|
Identify inserted recordable media type
You can use the system_profiler command from terminal:
Using system_profiler SPDiscBurningDataType you'll get something like this:
Or, if you want only the Media info, use:system_profiler SPDiscBurningDataType | sed -n "/Type:/,/*/ p" and you will get:
If you don't like Terminal, you can wrap the command in an Applescript like this one:
and save it as an application for your convenience. That's it.
Identify inserted recordable media type
Using this modified script the info dialog will show also the correct disk icon for the inserted media:
(the "display dialog" line is broken in three lines for better readability)
Identify inserted recordable media type
Just my luck: The first disc I tried this script on was type DVD-ROM. My System has no .icns file for that type. My quick and dirty fix was to wrap the "display dialog" line into a "try/on error/end try". Under the error condition I simply display the dialog without the icon.
Identify inserted recordable media type
True. I forgot a filter in the first statement also a CD-ROM would give an error. First line should read like this:
Anyway, it's a good idea to enclose the icon selection in a "try/on error/end try" clause. And I added the detection of no media inserted. Here is the updated script:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|