Page 1 of 6 123456 LastLast
Results 1 to 10 of 57

Thread: Auto CD / DVD Insert with definable actions

  1. #1
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,700
    Blog Entries
    1

    Auto CD / DVD Insert with definable actions

    Note: his has turned into a beta, as the script evolves to add more functionality and features from this thread. If you use this, pop in now and then to get the latest version.

    Basically this is a stand alone exe file, that you can start when Road Runner is launched. It will monitor your CD/DVD Drive in the background. If you put in an Audio CD, one action is taken, and another if a DVD is inserted.

    The actions taken are set up in the .ini file. You can use any Road Runner command. If you put a CD in, you can have it go to the CDRip screen if you wish.

    With the default ini settings, when a Audio CD is inserted, it will load the songs from the CD to a playlist, and then go to the audio screen, and automatically begin playing. The same goes for the DVD.

    When the disk is removed, it will continue to watch for another disk to be inserted.

    If a CD/DVD is in the drive when Road Runner is loaded, it will just ignore it. If you leave an disk in the drive, I personally do not want it to start playing every single time Road Runner is started

    YOU MUST change your CD/DVD drive letter in the ini initially to match the drive letter on your system.

    Just place the AutoLaunch.exe and the AutoLaunch.ini in any directory that you want, and have it either start with the computer, or when RR starts. It is very CPU friendly! It will use less than 1% of your CPU cycles while it is running in the system tray.

    CAUTION: If you start this with ONSKINSTART in the exectbl, the skin will load a second instance of the script with a RELOADSKIN command, so do try to avoid using this if you use an RELOADSKIN command in your skin to change background colors and the likes.

    09/13/07
    - I added code to save the playlist when a CD is inserted, and it will reload that playlist when the CD is ejected.

    09/14/07
    - It will now turn on and off 2 different indicators if a CD or DVD is in the drive. the indicator names are:
    "CUSTOM_DVDIN"
    "CUSTOM_CDIN"

    08/18/07
    - When a CD is now ejected, it will return the the song that was playing, and the position the song was at.
    - Delay timer set in the INI files to tweak it to slower, average, and faster CarPC's

    Download: AutoLaunch.zip
    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

  2. #2
    FLAC Griff1's Avatar
    Join Date
    Nov 2005
    Location
    Midlands
    Posts
    1,052
    Thanks John,i was at my wits end with the other complicated methods,kudos to you both for the effort.
    P4 2.8 HT, 512Mb Ram, 60Gb 2.5 HD, M4-ATX, SB Audigy2, BU353, Lilliput TS,Soundgraph Imon VFD,SONY Optiarc dvd Burner,RideRunner, iGo8, Custom Freedom 2.1

  3. #3
    inh
    inh is offline
    Maximum Bitrate
    Join Date
    Jan 2007
    Location
    Fort Riley KS
    Posts
    515
    Sweet John! RR keeps getting better and better! I trust this will be made a part of your skin?
    cashtexts - Earn money for receiving text messaged offers
    cashtexts review not a scam
    Space Navigator - 6 Axis input device: Take it apart - Driver App
    RRCam - Video/webcam capture, text overlay, and recording: 2.0 Stable

  4. #4
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,168
    Blog Entries
    51
    not that it would make much of a difference but i could create an official rr plugin that does this if interested. Good job john!
    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

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

    so would it be pos.

    to have this fired up from a button code, like in your player skin(john) the player button which has no real use at the moment, can i use that to .exe the program and it loads.

    also would it be pos. to use a button switch code to start the program and to unload the cd from the playlist and reinstate the origanal playlist with out ejecting the cd/dvd.

  6. #6
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,700
    Blog Entries
    1
    Quote Originally Posted by carputer1 View Post
    to have this fired up from a button code, like in your player skin(john) the player button which has no real use at the moment, can i use that to .exe the program and it loads.

    also would it be pos. to use a button switch code to start the program and to unload the cd from the playlist and reinstate the origanal playlist with out ejecting the cd/dvd.
    Just having the program running on startup, or such would work, so it is always running seems better to me.

    As for the playlist thing, sure that's actually easy. I can just save the playlist to a temp location when the CD is inserted, and just reinstate it when the CD is removed.

    Funny thing is, the inh messaged me today, and he suggested the very same thing
    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

  7. #7
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,700
    Blog Entries
    1

    Plugin [Script] Updated

    Ok, I added the code to save the playlist when a CD is inserted, and it will reload that playlist when the CD is ejected.

    The .zip file in the first post contains the new script.

    Here is the source code, if someone would like to make improvements or enhancements to make it better.

    Sonic, using the below code, you can probably pretty easily create a "True RR plugin" with it. The logic was the hard part to know when and when not to start, load the playlist, not keep triggering the CD ejected routine every 1 second ect! I agree this would be a much cleaner way to have the script load, and unload with RR.

    I added some comments in the script, to easily see what section is doing what.

    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")
    $CDCOMMAND = "LoadList;" & $MyDrive & "||" & $CDCOMMAND
    
    While 1
        $DiskType = DriveGetFileSystem($MyDrive)
    
        If $DiskType = "UDF" And $DiskInserted = "no" Then
    ;MsgBox(4096, "Drive Status:", "A DVD Was inserted")
            $rr.Execute($DVDCOMMAND)
            $DiskInserted = "yes"
        EndIf
    
        If $DiskType = "CDFS" And $DiskInserted = "no" Then
    ;MsgBox(4096, "Drive Status:", "An Audio CD Was inserted")
            $TypeDisk="CD"
            $SavePLCommand = "SAVELIST;$SKINPATH$TempPL.M3u"
            $rr.Execute($SavePLCommand)
    ; Pause for 2 seconds, give RR time to catch up and save the playlist to disk
            sleep(2000)
            $rr.Execute($CDCOMMAND)
            
            $DiskInserted = "yes"
        EndIf
    
        $DriveStatus = DriveStatus($MyDrive)
        If $DriveStatus = "NOTREADY" Then        
            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
    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

  8. #8
    Maximum Bitrate tundra2000's Avatar
    Join Date
    Mar 2006
    Location
    Houston, TX
    Posts
    551
    i have not downloaded this yet, so im not sure if this is a feature request or just a quesiton:

    can i have it execute some RR command on inserting a blank cd/dvd?

  9. #9
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,283
    john you really scare me, here is my script and is so similar, that i cut say something else, the only difference is that i use the cdplayer bat file from the cfx skin to save the playlist, and reload it back when the cd is ejected also mine is not running all the time(i dont use cd/dvd media that much).agree that sonic needs to make an official plug in.
    Code:
    Opt("WinTitleMatchMode", 3)
    $cdrom = "Cdrom"
    If WinExists($cdrom) Then Exit
    AutoItWinSetTitle($cdrom)
    $rr=ObjCreate("RoadRunner.sdk")
    $rrpath=$rr.getinfo("RRPATH")
    $rrdrive=$rr.getinfo("=$cddrive$")
    $drive=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'drive', $rrdrive)
    if (DriveStatus($drive) == "READY") then
    $type=DriveGetFileSystem($drive)
    $cdin=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'cdin','')
    $dvdin=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'dvdin','')
    if $type="CDFS" then $rr.Execute($cdin)
    if $type="UDF" then $rr.Execute($dvdin)
    	CDTray($drive, 'open')
    	Sleep(2000)
    EndIf
    While Not (DriveStatus($drive) == "READY")
    Sleep(2000)
    if (DriveStatus($drive) =="UNKNOWN") then
    	$blankcd=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'blankcd','"MENU;popup_success.skin||SETLABEL;!SUCCESS;!!COMMAND IS EMPTY!!||WAIT;3||CLOSE"')
    	$rr.Execute($blankcd)
    	ExitLoop
    	EndIf
    WEnd
    $status=DriveStatus ($drive)
    Sleep(1000)
    if $status="READY" then
    	    FileChangeDir ( $drive&"\" )
    	    $search = FileFindFirstFile("*.*")
    		If $search = -1 Then
    			 $cdempty=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'cdempty','"MENU;popup_success.skin||SETLABEL;!SUCCESS;!!COMMAND IS EMPTY!!||WAIT;3||CLOSE"')
    		 $rr.Execute($cdempty)
    	        Exit
            EndIf
             $file = FileFindNextFile($search)
    		Sleep(1000)
             $cd=FileExists($drive&"\*.cda")
    	     $dvd=FileExists($drive&"\VIDEO_TS")
        if $cd = 1 then
    		 $cd=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'cd','"MENU;popup_success.skin||SETLABEL;!SUCCESS;!!COMMAND IS EMPTY!!||WAIT;3||CLOSE"')
    		 $rr.Execute($cd)
    	ElseIf $dvd = 1 Then
    		 $dvd=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'dvd','""MENU;popup_success.skin||SETLABEL;!SUCCESS;!!DVD IN 0 COMMANDS!!||WAIT;3||CLOSE"')
     		 $rr.Execute($dvd)
    	Else
    		 $other=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'other','"MENU;popup_success.skin||SETLABEL;!SUCCESS;!!DATA DISK 0 COMMANDS!!||WAIT;3||CLOSE"')
    		 $rr.Execute($other)
        EndIf
    FileClose($search)
    		 Else
    		 $cdempty=IniRead($rrpath&'\cdrom.ini', 'SETTINGS', 'cdempty','')
    		 $rr.Execute($cdempty)
    EndIf

  10. #10
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,700
    Blog Entries
    1
    Quote Originally Posted by tundra2000 View Post
    i have not downloaded this yet, so im not sure if this is a feature request or just a quesiton:

    can i have it execute some RR command on inserting a blank cd/dvd?
    Hmmm right now if a blank CD/DVD is inserted it won't do anything... I will need to find a way to detect that to make it work.

    Quote Originally Posted by EL CAMINO View Post
    john you really scare me, here is my script and is so similar, that i cut say something else, the only difference is that i use the cdplayer bat file from the cfx skin to save the playlist, and reload it back when the cd is ejected also mine is not running all the time(i dont use cd/dvd media that much).agree that sonic needs to make an official plug in.
    Wow! that is close! hahaahhh! Wish I would have know that before I spent the time to write it heheeh.
    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

Page 1 of 6 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
  •