Hello world !
That's my first script, I'm so exciting that I want to share it.
This simple script will allow you to rip in one click your bluray disk into the directory named "d:/bluray movies/"
Its not very intuitive, but its works for me. Maybe someone will found it perfect for what he want.
Be carefull of :
-change path directory of your destination folder (replace d:/bluray movies)
-this is design in french
-You must have anydvd and powerdvd9 installed into program files before launch the script, but just change path if yours soft aren't on program file
This script works on Xp Home & Pro, Vista and Seven .
It very usefull on a huge collection of bluray movie, but dvd is okay too.
Code:
;Htpc auto rip
;works with anydvd & powerDVD
;BigJim, June 2009
WM_DEVICECHANGE( wParam, lParam )
{
P := lParam
If ( wParam = 32768 AND *(lParam+4) = 2)
{
Drv := Chr(65+ LN(*(P+12)+(*(P+13)<<8)+(*(P+14)<<16)+(*(P+15)<<24))/LN(2))
DriveData( Drv )
}
}
DriveData( Drv )
{
DriveGet, Type , Type , %Drv%:
DriveGet, Label , Label , %Drv%:
DriveGet, Serial, Serial, %Drv%:
Gui, Add, Text,, Notification du disque %Drv%: , Vous venez d'inserer un disque `nType:`t%Type%`nLabel:`t%Label%`nSerial:`t%Serial% . Que voulez vous faire ?
Gui 1 :Add, Button, gRIPPER,&Ripper
Gui,1 :Add, Button, gLIRE, &Lire
Gui,1 :Add, Button,gNERIENFAIRE , &Ne Rien Faire
Gui,1 :Show
sleep , 1000
KeyWait, LButton , L
}
OnMessage(0x219, "WM_DEVICECHANGE")
return
If Ripper=1
{
Gui,1 :Destroy
Gosub, Ripper
return
}
If Lire=1
{
Gui,1 : destroy
Gosub, Lire
return
}
If NeRienFaire=1
{
Gui,1 :destroy
Gosub, NeRienFaire
return
}
Ripper:
Gui,1 :destroy
MsgBox ,4 ,Quel Titre ? , Votre disque s'apelle `nLabel:`t%Label% voulez vous modifier le nom ?
WinActivate ,Quel Titre ?
IfMsgBox yes
{
Gosub, Titre
Return
}
run %ProgramFiles%\SlySoft\AnyDVD\AnyDVD.exe -iso
#IfWinActive ahk_class TRipHdForm
MouseClick , left , 248, 248
Return
Lire:
Run %ProgramFiles%\CyberLink\PowerDVD\PowerDVD.exe -play
Return
NeRienFaire:
Gui,1 :destroy
return
Titre:
Gui,1 :Destroy
Run C:\WINDOWS\system32\OSK.exe
WinActivate osk
Gui,2 :Add, Edit,vMainEdit x6 y60 w200 h30, Taper le titre du film
Gui,2 :Add, Button,Default gOkayButton x56 y140 w100 h30 , &Ok
Gui,2 :Add, Text, x6 y20 w200 h30 , Veuillez saisir le titre du Film
; Generated using SmartGUI Creator 4.0
Gui,2 :Show,x200 y0 w219 h185 , Saisie du titre
ControlFocus, TEdit1, Saisie du titre, , ,
return
OkayButton:
MyDirectoryPathMovie:="D:/Blu Ray Movies/";<===========| Replace text between "" by path of your choice.
MyExtension:=".iso"
Gui,2 : Submit
MsgBox,,,Votre film s'appelle :%MainEdit%
sleep 1000
WinClose osk
WinClose Clavier visuel
WinWaitClose Clavier visuel
winkill osk
WinKill Clavier visuel
Gui,2 :Destroy
run %ProgramFiles%\SlySoft\AnyDVD\AnyDVD.exe -iso
#IfWinActive ahk_class TRipHdForm
MyFinalPath = %MyDirectoryPathMovie% %MainEdit% %MyExtension%
WinWait, Rippeur AnyDVD,
IfWinNotActive, Rippeur AnyDVD, , WinActivate, Rippeur AnyDVD,
WinWaitActive, Rippeur AnyDVD,
MouseClick, left, 24, 109
Sleep, 100
Send, {DEL 100}
Send %MyFinalPath%
MouseClick, left, 258, 251
Return
big thanks to people who help me, and very big thank's to developer of ahk.