Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > AppleScripting CardBus ejects: How?

AppleScripting CardBus ejects: How?
Thread Tools
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Sep 15, 2003, 08:11 PM
 
Under MacOS 9, CardBus cards appear in the Finder as an icon on the desktop, and so can be manipulated. Under MacOS X, however, this doesn't work.

So how do you eject a cardbus card in MacOS X? TIA.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Sep 17, 2003, 02:48 AM
 
They appear as vols for me - check macosxhints for info about cards that hide themselves because of some kind of file.
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Sep 17, 2003, 12:46 PM
 
I can't find anything there. Searched for PCMCIA and CardBus both. Even did a Google search of the site and still nothing.

When you say your cards show up as vols, do you mean in /.vol ?
     
Dedicated MacNNer
Join Date: May 2003
Location: Santa Barbara
Status: Offline
Reply With Quote
Sep 17, 2003, 02:09 PM
 
What does running system_profiler in the terminal say about the card?
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Sep 17, 2003, 07:35 PM
 
http://docs.info.apple.com/article.html?artnum=75509


http://www.macosxhints.com/article.p...lume+invisible

That's what I was talking about - maybe it's not the same problem...
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Sep 18, 2003, 11:28 AM
 
That's what I was talking about - maybe it's not the same problem...
Thanks for the links, but it's a different problem. In my case, i'm trying to eject USB and FireWire cards, not volumes on CF cards.

What does running system_profiler in the terminal say about the card?
Code:
pccard: Model: TXN,PCI1131-01 Type: pccard Bus: PCI Device ID: 0x0000ac15 Revision ID: 0x00000001 Vendor ID: 0x0000104c pccard: Model: TXN,PCI1131-01 Type: pccard Bus: PCI Device ID: 0x0000ac15 Revision ID: 0x00000001 Vendor ID: 0x0000104c
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Sep 19, 2003, 05:20 AM
 
Sorry - excuse me for being stupid, but what is it you want to do?

is it - physically eject a PCMCIA card from your powerbook's chassis?

like this:


If so then you might be able to script it using UIScripting (Requires a beta version of System Events app ) and the PCCard Menu Extra (/System/Library/CoreServices/Menu Extras/PCCard.Menu)




Or is it - unmount a memory card (be it CF, Memory Stick, SmartMedia, etc..) (that is attached via a USB/FireWire reader) from the finder?

If it is the latter then it should be possible - I'm not sure why your volumes aren't appearing - my Memory Sticks and CF Cards all appear as Volumes that AS can Eject.

What do you mean by FireWire/USB cards? Do you mean readers/adapters that are connected by USB/FireWire? Or is this a USB/FireWire adapter that is in the PCMCIA slot.
(Last edited by Diggory Laycock; Sep 19, 2003 at 05:25 AM. )
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Sep 19, 2003, 02:31 PM
 
Yes, i wish to physically eject the card from the PB chassis. The reason i want to do this is because if the CardBus cards are ejected when book goes to sleep, i never see the black-screen sleep crash. If i can script the ejection, i can set the system up to automatically eject the cards prior to system sleep, thus ensuring i don't crash. Before i understood this connection, MacOS X was crashing frequently for me, and that was very frustrating.

I thought about using the beta UIScripting and the PCCard Menu Extra, as you mention, but i'd rather avoid using beta software, and i understand there are difficulties accessing menu extras with it, so i haven't experimented with it yet. I'm hoping Panther will have UIScripting incorporated, and so have been holding off on that approach until next month.

But there should be a way, and i should think a not too difficult way, to eject CardBus cards via software. After all, the PCCard Menu Extra does it. If i could find a CLI way to do it, i could script it. Or there ought to be a way to AppleScript it too, as i could do it in MacOS 9 (by telling the Finder to move the card's icon to the trash).
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Sep 21, 2003, 04:02 AM
 
I believe that the OS X Finder only deals with Volumes - So it won't show the Card.
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Sep 21, 2003, 11:37 AM
 
I sort of viewed CardBus cards as pseudo-volumes, at least on MacOS 9 (maybe cause they appear as icons on the desktop like disks do), but i suppose you're right that in the strictest sense they're not volumes (at least under MacOS X) but rather "devices."

To make matters worse, i just read that Panther doesn't install on Mac's without built-in USB, so Jaguar will be the last officially supported OS on my WallStreet. Maybe the UI Scripting will officially be supported in the forthcoming MacOS 10.2.8 update (due out this week)? Or maybe it's time to run with the beta version of the System Events app and see if that'll work with the CardBus menulet? I had been hoping to avoid that option, at least until a final release. Or maybe XPostFacto will allow Panther to install on the Wallstreet? But that would probably be less stable than a beta System Events app!

What really nags me is that it should be possible, simple and straightforward to do what i want! One would think that there'd be an easy CLI way to do this (which could of course be scripted via a do shell script). I just feel there's something simple i'm overlooking.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Sep 21, 2003, 01:45 PM
 
Wow - that wallstreet must be beginning to show its age. I had a pismo until recently - update to a new Powerbook - it will be worth it - it's a huge step-up (400? Mhz G3 -> 1GHz G4) .

Anyway - back to the topic, I have been running the System Events beta since it was released, and it's rock solid - you won't notice any downside to installing it.

I have to admit I'm not familiar with where the CardBus fits into the OS - there may be Darwin commands that can manipulate them.

The guys in the Unix forum might know a way.
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Sep 22, 2003, 01:14 PM
 
Thanks for all your suggestions. I will give the beta a try (if a final isn't rolled into MacOS X 10.2.8, due out this week) to see if that'll work; glad to hear it's been stable.

I did post a similar question to the UNIX forum, but nobody seemed to know the answer.

Yes, the 266Mhz G3 WallStreet is showing its age a bit, but it's not so bad really. I replaced the HD with a fast IBM 40 Gb Travelstar drive and it felt like i more than doubled the clock speed. A fast HD really is key to making MacOS X performance acceptable on the machine. With only 320 Mb of RAM, i could improve performance a bit by bumping it up to 512 Mb, but i hesitate to do that unless RAM prices fall some more (better to save that money for a new machine).
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:10 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2