Find out more about eggPlant

Forum IndexForum Index
Forums FAQForums FAQ
Search ForumsSearch Forums
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
Your ProfileYour Profile
Log inLog in
Getting mounted disk in Mac OS X.

 
Post new topic   Reply to topic   Printer-Friendly View    Forum Index -> Using Eggplant
View previous topic :: View next topic  
Author Message
EggplantElan
Earl of Eggplant


Joined: 03 Mar 2005
Posts: 9
Location: Cebu, Philippines

Posted: Fri May 06, 2005 10:34 pm
Post subject: Getting mounted disk in Mac OS X.
Reply with quote

Hi!

I am working with Mac OS X and I am developing a script that installs a package but my problem is after mounting a disk image. Is there any wy that I can get the newly mounted disk?
Back to top
View user's profile Send private message Send e-mail
EggplantMatt
Auberlord


Joined: 24 Jun 2003
Posts: 578
Location: Boulder, CO

Posted: Mon May 09, 2005 6:31 am
Post subject:
Reply with quote

I'm sorry, but I'm not sure what you mean by "get" the newly mounted disk. Get it where? What are you trying to do with it? If you can be more specific about the issue, we'll be more likely to be able to give you a good answer.
Back to top
View user's profile Send private message AIM Address
EggplantElan
Earl of Eggplant


Joined: 03 Mar 2005
Posts: 9
Location: Cebu, Philippines

Posted: Mon May 09, 2005 9:59 pm
Post subject:
Reply with quote

I'm sorry to confuse you. What I mean is I want my script to automatically find the newly mounted volume from my Mac OS X.

After mounting a .dmg (disk image) file, I want my script to automatically find the mounted volume or disk.

Actually, I have already a script that answers this topic but I want to ask for the better.

Thanks.
Back to top
View user's profile Send private message Send e-mail
EggplantElan
Earl of Eggplant


Joined: 03 Mar 2005
Posts: 9
Location: Cebu, Philippines

Posted: Mon May 09, 2005 10:09 pm
Post subject:
Reply with quote

This is what I did:

Code:

put "/Volumes/" into global volumes    
put the folders of global volumes into global volumesFolder    
repeat with each item of global volumesFolder       
    if it is equal to "BootCD" then          
         next repeat       
   else if it is equal to "Drop Box" then          
         next repeat       
    else if it is equal to "Elan" then          
         next repeat       
   else if it is equal to "SITES" then          
         next repeat       
   else if it is equal to "Storage" then          
         next repeat       
   else if it is equal to "Test" then          
        next repeat       
   else           
       put "/Volumes/" & it into global mounted_disk    
       exit handler       
   end if    
 end repeat


Note: BootCD, Elan, Drop Box, SITES, Storage and Test are the volumes of my machine.
Back to top
View user's profile Send private message Send e-mail
EggplantMatt
Auberlord


Joined: 24 Jun 2003
Posts: 578
Location: Boulder, CO

Posted: Tue May 10, 2005 5:47 am
Post subject:
Reply with quote

Elan:

This code would be a little more efficient:
Code:
global volumes
global volumesFolder
put "/Volumes/" into volumes    
put the folders of volumes into volumesFolder    
repeat with each item of volumesFolder       
    if it is not in ("BootCD", "Elan", "Drop Box", "SITES", "Storage", "Test")
       put volumes & it into global mounted_disk    
       exit handler       
   end if    
end repeat


- Matt
Back to top
View user's profile Send private message AIM Address
EggplantElan
Earl of Eggplant


Joined: 03 Mar 2005
Posts: 9
Location: Cebu, Philippines

Posted: Tue May 10, 2005 9:15 pm
Post subject:
Reply with quote

Thanks Matt.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   Printer-Friendly View    Forum Index -> Using Eggplant All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
 
TestPlant
©TestPlant Ltd 2009. All rights reserved.