Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 57

Thread: Auto CD / DVD Insert with definable actions

  1. #21
    Low Bitrate
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    106
    Excellent work! Thanks to all who contributed

    Can't wait to try this out now.....

  2. #22
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,046
    Blog Entries
    41
    many thanks for using "CUSTOM" and not "!" for the indicator. I think the ! need be abolished lol.
    NOVA, MD, DC Monthly Meets Here
    Ride Runner and Centrafuse 3 plugin creator
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  3. #23
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282
    true, using "CUSTOM" is a lot easier to interact with flash.

  4. #24
    Variable Bitrate chevyn8's Avatar
    Join Date
    Oct 2006
    Location
    small town nebraska
    Posts
    263
    CD file extension checking (insert an audio/mp3/what every extension it will play--a cd with just files/documents is ignored). This seems to work for me. It does some extension checking via the ini file. Would it be better if it pulled the playable extensions from rr.ini? I'm new to autoit, but not new to simple programming so be nice If this looks good I'll see about adding some video playing from CD's, or maybe look at a way to detect the media inserted as video/audio/dvd without CDFS and UDF--to add the ability to use this on a usb drive.
    This is added to the ini:
    CDEXTENSION=.mp3,.wav,.wma

    Code:
    ; Written by JohnWPB of the MP3 Car Forums 9/12/07
    ; This script will monitor your CD/DVD drive
    ; Looking for a CD or DVD to be inserted and
    ; will then auto play it inside Road Runner.
    ; When a CD is inserted, it will save your current
    ; playlist to a temporary file. When the CD is then
    ; ejected, it will then reload that playlist.
    
    Dim $DiskInserted
    Dim $DiskType
    Dim $DriveStatus
    Dim $TypeDisk
    
    ;Open communications with RR
    $rr = ObjCreate("RoadRunner.SDK")
    
    ; Read the lines from the AutoLaunch.ini
    $MyDrive = IniRead("AutoLaunch.ini", "Auto Drive Settings", "CDDrive", "NotFound")
    $DVDCOMMAND = IniRead("AutoLaunch.ini", "Auto Drive Settings", "DVDCOMMAND", "NotFound")
    $CDCOMMAND = IniRead("AutoLaunch.ini", "Auto Drive Settings", "CDCOMMAND", "NotFound")
    $CDEXTENSION = IniRead("AutoLaunch.ini", "Auto Drive Settings", "CDEXTENSION", "NotFound")
    $CDCOMMAND = "LoadList;" & $MyDrive & "||" & $CDCOMMAND
    $CDExt = StringSplit($CDEXTENSION, ",")
    While 1
        $DiskType = DriveGetFileSystem($MyDrive)
    
        If $DiskType = "UDF" And $DiskInserted = "no" Then
    ;MsgBox(4096, "Drive Status:", "A DVD Was inserted")
            $rr.Execute($DVDCOMMAND)
            $rr.Execute ("SETIND;CUSTOM_DVDIN;ON")
            $DiskInserted = "yes"
        EndIf
        
        If $DiskType = "CDFS" And $DiskInserted = "no" Then
    ;MsgBox(4096, "Drive Status:", "An Audio CD Was inserted")
            For $count = 1 to $CDExt[0]
                If FileExists($MyDrive & "*" & $CDExt[$count]) Then
                    $TypeDisk="CD"
                    $SavePLCommand = "SAVELIST;$SKINPATH$TempPL.M3u"
                    $rr.Execute($SavePLCommand)
                    $rr.Execute ("SETIND;CUSTOM_CDIN;ON")
    ; Pause for 2 seconds, give RR time to catch up and save the playlist to disk
                    sleep(2000)
                    $rr.Execute($CDCOMMAND)        
                    $DiskInserted = "yes"
                EndIf
            Next
        EndIf
    
        $DriveStatus = DriveStatus($MyDrive)
        If $DriveStatus = "NOTREADY" Then
            $rr.Execute ("SETIND;CUSTOM_CDIN;OFF")
            $rr.Execute ("SETIND;CUSTOM_DVDIN;OFF")        
            If $TypeDisk="CD" then
    ;MsgBox(4096, "Drive Status:", "an Audio CD Was Ejected")
                $LoadPLCommand = "LOADLIST;$SKINPATH$TempPL.M3u"
                $rr.Execute($LoadPLCommand)
                $TypeDisk = "None"
            EndIf
            $DiskInserted = "no"
        EndIf
    Sleep(2000)
    WEnd
    CarPC in my 82 Camaro. Dual core atom, M4-ATX, 7 lilliput, bu353 GPS, Reborn skin, punch 40/100ix
    MediaLaunch for RR
    Online Check for RR
    Locker for RR

  5. #25
    Variable Bitrate
    Join Date
    Jul 2006
    Posts
    361
    Hey John,
    I get this error occasionally when I eject the CD:
    Name:  error.JPG
Views: 316
Size:  8.0 KB

    any ideas?
    MSI K9N6GM
    1 gig RAM
    8" Lilliput
    Onstar GPS mod
    XM
    Visteon HDZ300

  6. #26
    THE EXPERIMENTER
    Auto Apps:loading...
    carputer1's Avatar
    Join Date
    Sep 2007
    Location
    UK,Surrey
    Posts
    1,976

    ok working so far

    the only problem i have is the eject command,
    is it path specific because its ejecting the wrong drive.
    this is on a laptop with built in drive and a usb drive, the usb drive iis the 1 up front of the car, so guess what its the 1 i want to use.

    but the eject command ejects the built in 1 not the usb 1

  7. #27
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,046
    Blog Entries
    41
    i dont believe there is a way to specify which drive you want to eject thru rr. If you dont uset he drive on your laptop just disable it thru device manager and rr will eject the external one.
    NOVA, MD, DC Monthly Meets Here
    Ride Runner and Centrafuse 3 plugin creator
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  8. #28
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282
    i think road runner ejects the first drive, and also i remeber having some issues with mine, if i leave it running all the time, thats why i use only when ejecting to fire up the script, and to eject the same drive specified in the ini.

    for the guy doing the extentions, use this instead of reading the ini, if you want to read audio extentions supported by roadrunner, same way for video extentions.
    Code:
    $CDEXTENTION=$rr.getinfo("=$audiofiles$")
    this way all the extentions that are in rr.ini under audiofiles will be used, remember the user from user settings.

  9. #29
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,676
    Blog Entries
    1
    Quote Originally Posted by chevyn8 View Post
    CD file extension checking (insert an audio/mp3/what every extension it will play--a cd with just files/documents is ignored). This seems to work for me. It does some extension checking via the ini file. Would it be better if it pulled the playable extensions from rr.ini? I'm new to autoit, but not new to simple programming so be nice If this looks good I'll see about adding some video playing from CD's, or maybe look at a way to detect the media inserted as video/audio/dvd without CDFS and UDF--to add the ability to use this on a usb drive.
    This is added to the ini:
    CDEXTENSION=.mp3,.wav,.wma
    Nice addition, will work on getting this implemented with changes I have made here.

    Quote Originally Posted by barnyard View Post
    Hey John,
    I get this error occasionally when I eject the CD:
    any ideas?
    I forgot to put an error routine to see if RR has been closed or not. This will in in the next version


    On another note, Liquid Smoke added some code to it, that will remember the song playing in your playlist when a CD is inserted. Meaning, if you hav e a10 song playlist, and are listening to the 8th song, when a CD is inserted it will save this info. When the CD is ejected, it will go back to song 8, and not to the beginning of the playlist.

    I have quite a few tweaks, additions and code to test and add before I put another beta of it.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  10. #30
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282
    try this to see what type of media is in the disc, whatever extentions you have in rr.ini under "audiofiles" and "videofiles", will be found including subfolder's.
    Code:
    #include <Array.au3>
    	dim $extarray, $output, $audio, $q, $video, $a
    
    $rr=ObjCreate("RoadRunner.sdk")
    $audext=$rr.getinfo("=$audiofiles$")
    $MyDrive = IniRead("AutoLaunch.ini", "Auto Drive Settings", "CDDrive", "D:")
    $vidext=$rr.getinfo("=$videofiles$")
    $AUDfound="NO"
    $VIDfound="NO"
    $audio=StringSplit($audext, ",")
    $video=StringSplit($vidext, ",")
    $search1 = $Mydrive&'\*'&(StringReplace($audext, ",",'*;'&$Mydrive&'\*'))&'*'
     $list1 = _Filesearch($search1, 1)
    if ($list1[0]) > 0 then
    	;MsgBox(0,"",$list1[0]&" Audio Files Found"&@CRLF)
    	$AUDfound="YES"
    EndIf
    
    $search2 = $Mydrive&'\*'&(StringReplace($vidext, ",",'*;'&$Mydrive&'\*'))&'*'
     $list2 = _Filesearch($search2, 1)
    if ($list2[0]) > 0 then
    	;MsgBox(0,"",$list2[0]&" Video Files Found"&@CRLF)
    	$VIDfound="YES"
    EndIf
        MsgBox(0,"","Video In Media ==> "&$VIDfound &" ==> "&$list2[0]& " Files"&@CRLF _
    	       & "Audio In Media ==> "&$AUDfound & " ==> "&$list1[0]& " Files")
    ;=======================================================================================================
    ;function created by bchris01
    ;=======================================================================================================
    Func _FileSearch($sQuery, $iSubdir = 0)
        Dim $aFiles[1]
        Dim $sLine, $aLine
        $aFiles[0] = 0
        $sQuery = StringSplit($sQuery, ';')
        For $L = 1 To $sQuery[0]
            $sArguments = "/a-d /b /on"
            If $iSubdir Then $sArguments = $sArguments & " /s"
            $aRaw = Run(@ComSpec & ' /c dir "' & $sQuery[$L] & '" ' & $sArguments, @SystemDir, @SW_HIDE, 2)
            While 1
                $sLine = StdoutRead($aRaw)
                If @error Then ExitLoop
                $aLine = StringSplit($sLine, @CRLF)
                If $aLine[0] > 1 Then
                    For $i = 1 To $aLine[0]
                        If $aLine[$i] = "" Then ContinueLoop
                        ReDim $aFiles[UBound($aFiles) + 1]
                        $aFiles[UBound($aFiles) - 1] = $aLine[$i]
                    Next
                ElseIf $aLine[0] = 1 Then
                    If $aLine[1] = "" Then ContinueLoop
                    If $aLine[1] = "File Not Found" Then ExitLoop
                    ReDim $aFiles[UBound($aFiles) + 1]
                    $aFiles[UBound($aFiles) - 1] = $aLine[1]
                Else
                    ExitLoop
                EndIf
            WEnd
        Next
        $aFiles[0] = UBound($aFiles) - 1
        Return $aFiles
    EndFunc

Page 3 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Wtb - Slot Load Dvd / Cd Player
    By SAScooby in forum Classified Archive
    Replies: 3
    Last Post: 04-25-2004, 07:01 PM
  2. Slim 8x DVD and 24x CD drives im selling Cheap!
    By infinkc in forum Classified Archive
    Replies: 0
    Last Post: 02-17-2004, 09:02 PM
  3. FS: Slimline CD & DVD, 512MB CF Card
    By StratusPh34r in forum Classified Archive
    Replies: 15
    Last Post: 01-31-2004, 08:31 PM
  4. PC CD/ DVD skipping problems?
    By Euclid in forum General Hardware Discussion
    Replies: 6
    Last Post: 02-05-2003, 08:43 PM
  5. Slimeline/Slotload CD or DVD Drive
    By Lando in forum General Hardware Discussion
    Replies: 7
    Last Post: 04-28-2002, 11:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •