At 08.06 9/16/97, Laurent Bardi wrote: >the goal is to have a mount/umount sub under macperl >sub mount >{ > local($zone,$machine,$share,$user,$password)=@_ >} >sub unmount >{ > local($zone,$machine,$share)=@_ >} Well, I couldn't figure out today how to unmount (anyone else have this?), but here is the mounting version. Requires the Mount Volume OSAX (Laurent has it if you can't find it online). #!perl -wl use strict; use Mac::AppleEvents; mount('PowerPudge','PowerPudge','Pudge','passwd'); sub mount { my($evt,@evt,%evt,$be,$rp,$er); die 'usage: mount(VOLUME,SERVER,USER,PASSWORD,ZONE)' if (!$_[0] || !$_[1]); %evt = ( VOLM=>shift, #required SRVR=>shift, #required USER=>shift, #optional PASS=>shift, #optional ZONE=>shift, #optional ); foreach (keys %evt) { if ($evt{$_}) { $evt .= ",$_:TEXT(@)"; push @evt,$evt{$_}; } } substr($evt,0,1) = ''; $be = AEBuildAppleEvent('aevt','mvol',typeApplSignature,'MACS',0,0,$evt,@evt) || die $^E; $rp = AESend($be, kAEWaitReply) or die $^E; if (defined($er = AEGetParamDesc($rp,'errn'))) { warn 'Mount Volume error ', AEPrint($er); } } __END__ -- Chris Nandor pudge@pobox.com http://pudge.net/ %PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10 1FF7 7F13 8180 B6B6']) ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch