Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
A cool button
Graphic Puzzle Dragger
Deleting a range of frames
Generic Countdown Timer
Read Text From File into Member w/ open dialog
DmySQL - mySQL backend for Director 'baby' version
Direct Media Simple Control
Expert Exchange Forum - Director
Developing Projects Using Director and ASP
Impactica
MediaMacros Xtras Mall
 

 

 

Behavior Find a drive with a specific name/Find CD Drives

Added on 10/2/2000

 

Compatibilities:
D7 D8 PC Script

Required Xtras:
Buddy API
FileXtra

This item has not yet been rated

Author: MediaMacros (website)

The first function will search your drives and return the drive letter of the drive with the name specified. Use like this... mydrive = findDriveNamed("MyCD")If no drive is found it returns "" The second function returns a lit of all the CD drives on a system. Call like this... CDdrives = findCDDrives()

on findDriveNamed whatName
  drives = drivesToList()
  repeat with x = drives.count down to 1
    if baDiskInfo( drives[x], "Name" ) = whatName then
      return drives[x]
      exit
    end if
  end repeat
  return ""
end

on findCDDrives
  cdList = []
  drives = drivesToList()
  repeat with x = drives.count down to 1
    if baDiskInfo( drives[x], "type" ) = "CD-ROM" then
      add cdList, drives[x]
    end if
  end repeat
  if cdList = [] then
    alert("No CD Drives found or no discs loaded.")
  else
    return cdList
  end if
end

on getBehaviorDescription me
  describe = "The first function will search your drives and return the drive letter of the drive with the name specified.  Use like this..." & return & "mydrive = findDriveNamed(" & quote & "MyCD" & quote & ")" & "If no drive is found it returns " & quote & quote & return & "The second function returns a lit of all the CD drives on a system.  Call like this..." & return & "CDdrives = findCDDrives()" & return & "Both require the freeware fileXtra - free with Dir 6.5 and 7"
  return describe
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail