Jump to content

Cd Loader V.01


 Share

Recommended Posts

Hi everybody!

ok this program will load audio cd images to alcohol 120%. The script is a sample you need to know a little about batch and autoit to customize it.

AutoItSetOption("WinTitleMatchMode", 4)

;(----------------------This is a list of the CD's in Inventory----------------------)

$cdloaderdir = "c:\WINNT\CD Loader\"  ;CD Loader installation directory

$trayplaymessage = "Currently Playing..." ;tray tip title message

$playername = "classname=WMPlayerApp"  ;classname of the player used

$forwardhotkey = "{CTRLDOWN}f{CTRLUP}"  ;hotkey for "next track"

$backhotkey = "{CTRLDOWN}b{CTRLUP}"  ;hotkey for "previous track"

$cd1 = "muse - absolution"   ;Name of CD 1

$cd2 = "frou frou - details"   ;Name of CD 2

$cd3 = "kylie minogue - fever"   ;Name of CD 3

$cd4 = "postal service - give up"  ;Name of CD 4

$cd5 = "coldplay - a rush of blood to the head" ;Name of CD 5

$cd6 = "wyclef jean - the carnival"  ;Name of CD 6

;(----------------------This is the start of the loop----------------------)

$loopy = 0

while $loopy = 0

$input = InputBox ( "CD Loader", "Enter a command","","",170,40,0,0)

If @error = 1 Then

exit

;(----------------------Here are the commands for input values----------------------)

elseif $input = "list" Then

MsgBox(0, "CD inventory List", $cd1 & @CRLF & $cd2 & @CRLF & $cd3 & @CRLF & $cd4 & @CRLF & $cd5 & @CRLF & $cd6)

ElseIf $input = "forward" Then

winactivate($playername)

winwait($playername)

send($forwardhotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

ElseIf $input = "next" Then

winactivate($playername)

winwait($playername)

send($forwardhotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

elseif $input = "back" Then

winactivate($playername)

winwait($playername)

send($backhotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

elseif $input = "previous" Then

winactivate($playername)

winwait($playername)

send($backhotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

elseif $input = $cd1 Then

winclose($playername)

run ($cdloaderdir & $cd1 & ".bat","",@SW_HIDE)

winwait("classname=WMPlayerApp")

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd1,20,1)

elseif $input = $cd2 Then

winclose($playername)

run ($cdloaderdir & $cd2 & ".bat","",@SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd2,20,1)

elseif $input = $cd3 Then

winclose($playername)

run ($cdloaderdir & $cd3 & ".bat","",@SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd3,20,1)

elseif $input = $cd4 Then

winclose($playername)

run ($cdloaderdir & $cd4 & ".bat","",@SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd4,20,1)

elseif $input = $cd5 Then

winclose($playername)

run ($cdloaderdir & $cd5 & ".bat","",@SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd5,20,1)

elseif $input = $cd6 Then

winclose($playername)

run ($cdloaderdir & $cd6 & ".bat","",@SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd6,20,1)

else

msgbox(48,"CD Loader information","'" & $input & "'" & " was not found in the database")

endif

wend

And here are some of the batch files

@echo off

cd "C:\Program Files\Alcohol Soft\Alcohol 120"

axcmd z: /u

axcmd z: /m:"D:\ISO Folder\Music\Coldplay\Coldplay - A Rush of Blood To The Head.cue"

@echo off

cd "C:\Program Files\Alcohol Soft\Alcohol 120"

axcmd z: /u

axcmd z: /m:"D:\ISO Folder\Music\Kylie Minogue\Kylie Minogue - Fever.nrg"

the batch files are named "artist - album.bat"

There it is! It is simple but really efficient when it comes to size. The batch files are usually held in the same directory as the script but you could put them anywhere you want. (i stored mine in c:\winnt\cd loader) well thats it!

If someone could help me make a ini script for the next version that would be great! well i am working on the installer and it should be out this week!

Ciao!

ghettochild

Edited by ghettochild
Link to comment
Share on other sites

For (example) batch file number 1, you can use this:

$AlcoholDir = @ProgramFilesDir & "\Alcohol Soft\Alcohol 120"

RunWait(@COMSPEC & " /c axcmd z: /u", $AlcoholDir, @SW_HIDE)
RunWait(@COMSPEC & ' /c axcmd z: /m:"D:\ISO Folder\Music\Coldplay\Coldplay - A Rush of Blood To The Head.cue"', $AlcoholDir, @SW_HIDE)

But you can automate your script more; You can make it much shorter.

Link to comment
Share on other sites

It's all in the helpfile.

Here it is shown:

$IniFile = @ScriptDir & "\settings.ini"
IniWrite($IniFile, "section", "variable", "value")
$Readvalue = IniRead($IniFile, "section", "variable", "..if value not found..")
Edited by SlimShady
Link to comment
Share on other sites

I am posting again because i need to keep that last one as a backup so here is Version .02 thanks to Slimshady

AutoItSetOption("WinTitleMatchMode", 4)

;(----------------------This is a list of the CD's in Inventory----------------------)

$IniFile = @ScriptDir & "\settings.ini"

$cdloaderdir = IniRead($IniFile, "Misc", "cdloaderdir")

$AlcoholDir = @ProgramFilesDir & "\Alcohol Soft\Alcohol 120"

$trayplaymessage = IniRead($IniFile, "Misc", "trayplaymessage")

$playername = IniRead($IniFile, "Misc", "playername")

$nexthotkey = IniRead($IniFile, "Track Movement", "next")

$previoushotkey =IniRead($IniFile, "Track Movement", "previous")

$cd1 = IniRead($IniFile, "CD title information", "cd1")

$cd2 = IniRead($IniFile, "CD title information", "cd2")

$cd3 = IniRead($IniFile, "CD title information", "cd3")

$cd4 = IniRead($IniFile, "CD title information", "cd4")

$cd5 = IniRead($IniFile, "CD title information", "cd5")

$cd6 = IniRead($IniFile, "CD title information", "cd6")

$CD1local =IniRead($IniFile, "cd locations", "CD1local")

$CD2local =IniRead($IniFile, "cd locations", "CD2local")

$CD3local =IniRead($IniFile, "cd locations", "CD3local")

$CD4local =IniRead($IniFile, "cd locations", "CD4local")

$CD5local =IniRead($IniFile, "cd locations", "CD5local")

$CD6local =IniRead($IniFile, "cd locations", "CD6local")

IniWrite($IniFile, "section", "variable", "value")

$Readvalue = IniRead($IniFile, "section", "variable", "..if value not found..")

;(----------------------This is the start of the loop----------------------)

$loopy = 0

while $loopy = 0

$input = InputBox ( "CD Loader", "type here (type list for help)","","",170,40,0,0)

If @error = 1 Then

exit

;(----------------------Here are the commands for input values----------------------)

elseif $input = "list" Then

MsgBox(0, "CD inventory List", $cd1 & @CRLF & $cd2 & @CRLF & $cd3 & @CRLF & $cd4 & @CRLF & $cd5 & @CRLF & $cd6)

ElseIf $input = "forward" Then

winactivate($playername)

winwait($playername)

send($nexthotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

ElseIf $input = "next" Then

winactivate($playername)

winwait($playername)

send($nexthotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

elseif $input = "back" Then

winactivate($playername)

winwait($playername)

send($previoushotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

elseif $input = "previous" Then

winactivate($playername)

winwait($playername)

send($previoushotkey)

WinSetState ($playername,"",@SW_MINIMIZE)

elseif $input = $cd1 Then

winclose($playername)

RunWait(@COMSPEC & " /c axcmd z: /u", $AlcoholDir, @SW_HIDE)

RunWait(@COMSPEC & " /c axcmd z: /m:" & $CD1local, $AlcoholDir, @SW_HIDE)

winwait("classname=WMPlayerApp")

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd1,20,1)

elseif $input = $cd2 Then

winclose($playername)

RunWait(@COMSPEC & " /c axcmd z: /u", $AlcoholDir, @SW_HIDE)

RunWait(@COMSPEC & " /c axcmd z: /m:" & $CD2local, $AlcoholDir, @SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd2,20,1)

elseif $input = $cd3 Then

winclose($playername)

RunWait(@COMSPEC & " /c axcmd z: /u", $AlcoholDir, @SW_HIDE)

RunWait(@COMSPEC & " /c axcmd z: /m:" & $CD3local, $AlcoholDir, @SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd3,20,1)

elseif $input = $cd4 Then

winclose($playername)

RunWait(@COMSPEC & " /c axcmd z: /u", $AlcoholDir, @SW_HIDE)

RunWait(@COMSPEC & " /c axcmd z: /m:" & $CD4local, $AlcoholDir, @SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd4,20,1)

elseif $input = $cd5 Then

winclose($playername)

RunWait(@COMSPEC & " /c axcmd z: /u", $AlcoholDir, @SW_HIDE)

RunWait(@COMSPEC & " /c axcmd z: /m:" & $CD5local, $AlcoholDir, @SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd5,20,1)

elseif $input = $cd6 Then

winclose($playername)

RunWait(@COMSPEC & " /c axcmd z: /u", $AlcoholDir, @SW_HIDE)

RunWait(@COMSPEC & " /c axcmd z: /m:" & $CD6local, $AlcoholDir, @SW_HIDE)

winwait($playername)

WinSetState ($playername,"",@SW_MINIMIZE)

TrayTip ($trayplaymessage,$cd6,20,1)

else

msgbox(48,"CD Loader information","'" & $input & "'" & " was not found in the database")

endif

wend

and the ini file NOTE THE INI FILE MUST BE NAMED "settings.ini"

[Track Movement]

next="{CTRLDOWN}f{CTRLUP}"

previous="{CTRLDOWN}b{CTRLUP}"

[CD titles]

CD1=muse - absolution

CD2=frou frou - details

CD3=kylie minogue - fever

CD4=postal service - give up

CD5=coldplay - a rush of blood to the head

cD6=wyclef jean - the carnival

[cd locations]

CD1local="D:\ISO Folder\Music\Coldplay\Coldplay - A Rush of Blood To The Head.cue"

CD2local="D:\ISO Folder\Music\Frou Frou\Frou Frou - Details.nrg"

cD3local="D:\ISO Folder\Music\Kylie Minogue\Kylie Minogue - Fever.nrg"

cD4local="D:\ISO Folder\Music\Postal Service\Postal Service - Give Up.nrg"

CD5local="D:\ISO Folder\Music\Coldplay\Coldplay - A Rush of Blood To The Head.cue"

CD6local="D:\ISO Folder\Music\Wyclef Jean\Wyclef Jean - The Carnival.cue"

[Misc]

cdloaderdir="c:\WINNT\CD Loader\"

trayplaymessage="Currently Playing..."

playername="classname=WMPlayerApp"

alcoholcmd="c:\program files\Alcohol Soft\Alcohol 120\axcmd.exe"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...