Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
09-12-2007, 05:01 PM
|
#1
|
|
Road Runner & Mp3car Gatherings Moderator
Join Date: Sep 2005
Location: West Palm Beach, Florida
Vehicle: 99 Mitsubishi Eclipse
Posts: 2,793
|
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
Last edited by JohnWPB : 09-18-2007 at 08:13 PM.
|
|
|
09-13-2007, 06:23 AM
|
#2
|
|
FLAC
Join Date: Nov 2005
Location: Midlands
Vehicle: 2001/Vauxhall/Zafira 1.8 16v
Posts: 920
|
Thanks John,i was at my wits end with the other complicated methods,kudos to you both for the effort.
__________________
P4 2.8 HT, 1GB Ram, 200Gb 3.5 HD, M4-ATX,2 x Silabs USB, SB Audigy2, BU353, Lilliput TS,Soundgraph Imon VFD,SONY Optiarc dvd Burner,RoadRunner, iGo8,Custom Freedom 2.1
|
|
|
09-13-2007, 07:08 AM
|
#3
|
|
Maximum Bitrate
Join Date: Jan 2007
Location: Fort Riley KS
Vehicle: 91 CRX Si
Posts: 514
|
Sweet John! RR keeps getting better and better! I trust this will be made a part of your skin?
|
|
|
09-13-2007, 08:09 AM
|
#4
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,786
|
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!
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
SKIN PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail and More!!! :)
|
|
|
09-13-2007, 11:47 AM
|
#5
|
|
Maximum Bitrate
Join Date: Sep 2007
Posts: 581
|
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.
|
|
|
09-13-2007, 02:43 PM
|
#6
|
|
Road Runner & Mp3car Gatherings Moderator
Join Date: Sep 2005
Location: West Palm Beach, Florida
Vehicle: 99 Mitsubishi Eclipse
Posts: 2,793
|
Quote: Originally Posted by carputer1 
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 
|
|
|
09-13-2007, 03:45 PM
|
#7
|
|
Road Runner & Mp3car Gatherings Moderator
Join Date: Sep 2005
Location: West Palm Beach, Florida
Vehicle: 99 Mitsubishi Eclipse
Posts: 2,793
|
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
|
|
|
09-13-2007, 05:28 PM
|
#8
|
|
Maximum Bitrate
Join Date: Mar 2006
Location: south bend, indiana
Vehicle: 2004 Ford F150 FX4
Posts: 512
|
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?
|
|
|
09-13-2007, 05:50 PM
|
#9
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 777
|
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
|
|
|
09-13-2007, 06:40 PM
|
#10
|
|
Road Runner & Mp3car Gatherings Moderator
Join Date: Sep 2005
Location: West Palm Beach, Florida
Vehicle: 99 Mitsubishi Eclipse
Posts: 2,793
|
Quote: Originally Posted by tundra2000 
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 
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.
|
|
|
09-13-2007, 06:43 PM
|
#11
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 777
|
mine has the blank media option. feel free to use the code. and improve it.
|
|
|
09-13-2007, 07:08 PM
|
#12
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,786
|
Quote: Originally Posted by JohnWPB 
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.
Wow! that is close! hahaahhh! Wish I would have know that before I spent the time to write it heheeh.
Sonic's K.I.S.S method (keep it simple stupid!) would be to check the free space in the main directory.. if its 750 its a blank cd.. if its 4.7 its a blank dvd. 
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
SKIN PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail and More!!! :)
|
|
|
09-13-2007, 08:33 PM
|
#13
|
|
Low Bitrate
Join Date: Apr 2006
Location: Maryland
Vehicle: 2005 Honda Civic
Posts: 73
|
set off indicators?
Hi,
I haven't used the program yet, but I was wondering if you make it so that when you insert a cd, dvd or blank disk, it will set off an indicator in RR telling me that a disk is in the drive. If you can do that or at least point me in the right direction it will be much appreciated.
|
|
|
09-13-2007, 08:44 PM
|
#14
|
|
Constant Bitrate
Join Date: Oct 2006
Posts: 212
|
Popped in a blank CD and it shows 702MB free.... I'm sure you like more suggestions  How about if it detects .mp4 or .mpg and opens the video player, or if it detects .mp3 or other music file and plays them--regardless of CD/DVD. This goes past CDFS and UDF detection though.
|
|
|
09-13-2007, 08:59 PM
|
#15
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 777
|
Quote: Originally Posted by 2poor4mods 
Hi,
I haven't used the program yet, but I was wondering if you make it so that when you insert a cd, dvd or blank disk, it will set off an indicator in RR telling me that a disk is in the drive. If you can do that or at least point me in the right direction it will be much appreciated.
if you want to use john's script do this,
in the ini add this code
Code:
CDCOMMAND=AUDIO||SETIND;CUSTOM_CDIN;ON
DVDCOMMAND=DVD||SETIND;CUSTOM_DVDIN;ON
and in the button that you use for eject, add this.
Code:
"SETIND;CUSTOM_CDIN;OFF||SETIND;CUSTOM_DVDIN;OFF"
the indicators in you skin shut be
and
this will work if you use RoadRunner to eject. if not the indicators will not change states, unless the code is rewritten for that which is not to hard.
NOTE: YOU CAN USE A SINGLE LABEL FOR THIS. IF YOU WANT I LET YOU KNOW HOW.
Last edited by EL CAMINO : 09-13-2007 at 09:03 PM.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:28 PM.
|
|