Search and download music video On Yahoo US and FR

title says it all

Postby hoogli on Sat Mar 05, 2005 4:10 pm

ticklemeozmo wrote:In the english version the URL is incorrect.

The program uses:
http://search.launch.yahoo.com/search/lsearch/video?p=

the website uses:
http://search.launch.yahoo.com/launch/s ... m=video&p=


is there any way i can manually fix this? or do i have to wait for Jbt_f to update it?
hoogli
 
Posts: 2
Joined: Sat Mar 05, 2005 4:08 pm

Postby C-moi on Sat Mar 05, 2005 5:23 pm

the script use 2 exe :
myLAUNCH.exe
and
myLaunchFR.exe
I ask to Jbt_f if he can modify myLAUNCH.exe cause the english url is incorrect : he tried but don't succeed (he made myLaunchFR.exe but myLAUNCH.exe has been written by another developper and jbt_f can't modify this program, sorry)
C-moi
 
Posts: 164
Joined: Fri Apr 23, 2004 6:58 am
Location: France

Postby hoogli on Thu Mar 10, 2005 1:23 am

i found the original myLAUNCH.exe file at http://narcan.net/programs.html , along with the perl source, which can be used instead of the program, if you have perl. however, when i fixed the link in perl, the search still didn't work. i contacted narcan.net, but the website doesnt seem to be updated anymore.
hoogli
 
Posts: 2
Joined: Sat Mar 05, 2005 4:08 pm

Postby atari800 on Tue Mar 15, 2005 2:43 pm

I fixed the search for the US using perl but cannot compile it to an EXE.
If someone can give me (point me to) instructions on what I need to setup to compile, I can place it out there on the net somewhere.

If not, I'll try to find my visual basic cd and install it. Maybe I can remember how to program in VB, then try to interpret PERL and convert to VB.

/|\
atari800
 
Posts: 11
Joined: Tue Mar 15, 2005 2:38 pm

Postby badubo on Tue Mar 15, 2005 2:47 pm

atari800 wrote:I fixed the search for the US using perl but cannot compile it to an EXE.
If someone can give me (point me to) instructions on what I need to setup to compile, I can place it out there on the net somewhere.

If not, I'll try to find my visual basic cd and install it. Maybe I can remember how to program in VB, then try to interpret PERL and convert to VB.

/|\

you can use perl2exe
http://www.indigostar.com/perl2exe.htm
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby atari800 on Tue Mar 15, 2005 3:14 pm

Thanks!!!
I will get on it afterwork.

/|\
atari800
 
Posts: 11
Joined: Tue Mar 15, 2005 2:38 pm

Postby atari800 on Wed Mar 16, 2005 12:08 am

atari800
 
Posts: 11
Joined: Tue Mar 15, 2005 2:38 pm

Postby C-moi on Wed Mar 16, 2005 7:01 am

Hello atari800,
it seems that the link is broken : i would download myLaunch.exe : could you update the link please ?
Thanks
C-moi
 
Posts: 164
Joined: Fri Apr 23, 2004 6:58 am
Location: France

Postby atari800 on Wed Mar 16, 2005 2:37 pm

Sorry about that - I was testing it from home and I guess it was cached. Thats why it worked for me.

Try this:
http://www.geocities.com/gene_shilot/

Click on download mylaunch here to get it
atari800
 
Posts: 11
Joined: Tue Mar 15, 2005 2:38 pm

Postby C-moi on Wed Mar 16, 2005 6:53 pm

Thanks atari800
i will try it
Best regards
C-moi
 
Posts: 164
Joined: Fri Apr 23, 2004 6:58 am
Location: France

Postby rhinton on Tue Apr 26, 2005 10:11 am

I need a little help. I am getting an "Invalid Procedure Call or argument:'Left'" error when I run myLauch_to_Filelist.vbs
Could someone look at this and tell me what I am doing wrong. The place where I want my music videos to go is D:\MUSIC VIDEOS.
Here is the .vbs:

' myLaunch_to_FileList revC.1 (for myHTPC .my or Xlobby .Xml file pattern !)

Dim f, fl, fso, fc, fl_nbr, OutFile, FSO_Out, OutPath, OutFilePL, FSO_OutPL, OutPathPL, FSO_ren, FSO_mms, mmsFile, renFile, Asx_FileName
Dim Search_String, myLaunch_Path, Current_Path, Cmd_Line, WshShellDL, WshShell, ReturnVal
Dim Add_Path, Get_mms_link, Get_mms_link_truncated, Replace_XML_Charaters, Do_Move_Action, All_Chained
Dim mms_link, mms_link_full, mms_video_name, mmsFileTitle, RenFileTitle, myLaunch_exe_to_run, Progress_bar
Dim WavExeTool, WavAudioFile
' ---------------------------------------8<---------------------------------------
' Needs :
' - wget.exe program in "C:\Program Files\Xlobbyfr\Applications\Outils\" directory
' - PlayWav.exe program in "C:\Program Files\Xlobbyfr\Applications\Outils\" directory
' - Recherche.wav sound fine in "C:\Program Files\Xlobbyfr\Applications\Outils\" directory
' ---------------------------------------8<---------------------------------------
' Note:PlayWav.exe (c)WebGeek, Inc. (mailto:dave@basicguru.com-http://www.basicguru.com/cmdtools/)
' ---------------------------------------8<---------------------------------------
' General variables...
Script_Title = "ASX to file list" ' Titrate script, for limp of dialogue...
myLaunch_Path = "C:\Program Files\XlobbyFr\applications\myLAUNCH\myLAUNCH.exe" ' Site of the tool of récup' online of the files asx since US the Yahoo site
myLaunchFR_Path = "C:\Program Files\XlobbyFr\applications\myLAUNCH\myLAUNCHFR.exe" ' Site of the tool of récup' online of the files asx since the site Yahoo FR
OutFileTitle = "OutList" ' Name of the file result (WITHOUT extension!) for my or xml
OutFileTitlePL = "OutListPL" ' Name of the file result for PlayList WMP9 (WITHOUT extension!)
mmsFileTitle = "List_mms.lst" ' Name of the file result (all the bonds mms reference mark contains running (asx) for NetTransport)
RenFileTitle = "List_Ren.mms" ' Name of the file result (the correspondence mms - wmv or asf contains)
' ---------------------------------------8<---------------------------------------
' General Options ...
Default_my_or_Xml = False ' To generate a file my (= True, default value) or a Xml file (= False)
CmdLine_or_InputBox = False ' Récup. (Title or Artist) on the line of order of script (= True) or by InputBox (= False, default value)
Add_Path = True ' For each asx, to have the complete repertory written in the file result (= True, default value)
Get_mms_link_truncated = True ' Récuperer the bond mms in truncated version (on the level of the wmv or asf) (= False, default value)
Get_mms_link = False ' Récuperer the complete bond mms (since the asx) (= True, default value)
Replace_XML_Charaters = True ' To replace the special characters with the format xml (= True, default value)
Set_ASX_in_parameter2 = True ' If Get_mms???=True, and if Set_ASX_in_parameter2=True, then one generates new special with the file asx
Show_myLaunch_Progress = False ' Afficher la fenetre de download des fichiers asx (=False, valeur par défaut)
Del_old_ASX_files = True ' Supprimer les fichiers asx avat download (=True, valeur par défaut !)
Del_DL_ASX_files = False ' Supprimer les fichiers asx apres download (=False, valeur par défaut !)
Show_Message_At_End = False ' Afficher un popup pour signaler que le fichier Output a été généré (=True, valeur par défaut !)
ProgressWindow = True ' Show a progress bar ?
' ---------------------------------------8<---------------------------------------
' Répertoire ou le fichier XML sera copié en fin de traitement (les fichiers asx restent ou ils sont !)...
' Exemple : Database_Path = "C:\Program Files\XlobbyFr\databases\"
' Si le repertoire reste vide, c'est le repertoire courant qui est pris par defaut.
Database_Path = "C:\Program Files\XlobbyFr\databases\"
WavExeTool = "C:\Program Files\Xlobbyfr\applications\Outils\PlayWav.exe"
WavAudioFile = "C:\Program Files\Xlobbyfr\applications\Outils\Recherche.wav"

' ---------------------------------------8<---------------------------------------
' En cours de debug...
Create_WMP_PLayList = False ' Génerer une playlist au format WMP9 (=True, valeur par défaut)
' ---------------------------------------8<---------------------------------------
' Play a sound to warn user when .xml file is finished
' (default is True)
' ---------------------------------------8<---------------------------------------
Tell_me_when_finished_Play_a_Wav = True
set WshShellWav = WScript.CreateObject("WScript.Shell")

' Pour la suite, pas touche... ;-)

Set WshShell = WScript.CreateObject("WScript.Shell")


' ---------------------------------------8<---------------------------------------
' Récup. du (Titre ou Artiste) sur la ligne de commande ou par InputBox ?
' If ( CmdLine_or_InputBox ) Then
If ( WScript.Arguments.Count <> 0 ) Then
Search_String = Extract_Full_CommandLine_args()
Else
If Default_my_or_Xml Then
Search_String = InputBox("Entrez un nom d'artiste ou un titre de musique." & Chr(10) & _
"ex. : REM ou White Flag" & Chr(10) & Chr(10) & _
"Fichier généré au format myHTPC.",Script_Title)
Else
Search_String = InputBox("Entrez un nom d'artiste ou un titre de musique." & Chr(10) & _
"ex. : REM ou White Flag" & Chr(10) & Chr(10) & _
"Fichier généré au format Xlobby.",Script_Title)
End If
End If
' ---------------------------------------8<---------------------------------------

If ( Len(Search_String) = 0 ) Then
MsgBox "Pas d'information de recherche (Artiste ou Titre) spécifiée sur la ligne de commande...", 16, Script_Title
Wscript.Quit
End If


If ( ProgressWindow ) Then
Message_Popup_Init Script_Title
Progress_bar = ""
Message_Popup_Write "- Recherche en cours pour -<BR>[ "&Search_String&" ]",Progress_bar
End If


' ---------------------------------------8<---------------------------------------
Current_Path = WshShell.CurrentDirectory & "\"
If ( Default_my_or_Xml ) Then
OutPath = Current_Path & OutFileTitle & ".my"
Else
OutPath = Current_Path & OutFileTitle & ".xml"
End If
If Create_WMP_PLayList Then
OutPathPL = Current_Path & OutFileTitle & ".wpl"
End If
If ( Len(Database_Path) = 0 ) Then
Database_Path = Current_Path
Do_Move_Action = False
Else
Do_Move_Action = True
End If
' ---------------------------------------8<---------------------------------------

' Delete all old asx files before download new ones...
' For "Debug" only : comment next line
If Del_old_ASX_files Then
Delete_Asx_Files
End If


' Create the outpout file(s)...
Start_With_Out_File
If Create_WMP_PLayList Then
Start_With_OutPL_File
End If

' Write header of Out XML file ?
If ( Not Default_my_or_Xml ) Then
' Create a Out XML file with 'correct' header
Write_XML_Header
End If

' Write header of WMP9 PL file ?
If Create_WMP_PLayList Then
Write_WMP_PL_Header()
End If


' ---------------------------------------8<---------------------------------------
' Begin Loop here :
' - 1st Loop : myLauch (Yahoo US),
' - 2nd Loop : myLauchFR (Yahouu FR)
' ---------------------------------------8<---------------------------------------
For Boucle = 1 To 2

If Boucle = 1 Then
' This is the first loop : browse Yahoo US
myLaunch_exe_to_run = myLaunch_Path
If ( ProgressWindow ) Then
Progress_bar = "sur site Yahoo US..."
Message_Popup_Write "- Recherche en cours pour -<BR>[ "&Search_String&" ]",Progress_bar
End If
Else
' This is the second loop : browse Yahoo FR
myLaunch_exe_to_run = myLaunchFR_Path
If ( ProgressWindow ) Then
Progress_bar = "sur site Yahoo FR..."
Message_Popup_Write "- Recherche en cours pour -<BR>[ "&Search_String&" ]",Progress_bar
End If
End If

' ---------------------------------------8<---------------------------------------
' Download all asx files from Yahoo web site...
' Cmd_Line = myLaunch_Path & " -s " & chr(34) & Search_String & chr(34)
Cmd_Line = chr(34) & myLaunch_exe_to_run & chr(34) & " -s " & chr(34) & Search_String & chr(34)
Set WshShellDL = WScript.CreateObject("WScript.Shell")
' For "Debug" only : comment next line
If Show_myLaunch_Progress Then
ReturnVal = WshShellDL.run (Cmd_Line,1,True)
Else
ReturnVal = WshShellDL.run (Cmd_Line,0,True)
End If
' ---------------------------------------8<---------------------------------------

Next
' ---------------------------------------8<---------------------------------------
' End Loop here
' ---------------------------------------8<---------------------------------------


' ---------------------------------------8<---------------------------------------
' List all asx files in current folder (previously downloaded by myLauncher.exe)
folderspec = Current_Path
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
fl_nbr = 0

If ( ProgressWindow ) Then
Progress_bar = "Lister les fichiers asx téléchargés..."
Message_Popup_Write "- Recherche terminée pour -<BR>[ "&Search_String&" ]",Progress_bar
End If

' Browse all asx files in currect folder...
For Each fl In fc
If ( InStr(fl.name,".asx") <> 0 ) Then
' Having found an asx file :
Asx_FileName = fl.name
fl_nbr = fl_nbr + 1
' Perform all "write" actions in the Out file (to correct .Xml or .my pattern)
Write_Asx_FileName_in_Out

' Extract mms and artist&title infos
Browse_asx_to_Extract_wmv_infos

' Write infos in mmsFile and renFile files
Add_infos_to_mmsFile_and_renFile
End If
Next
' ---------------------------------------8<---------------------------------------

' Write All_Clips chained for my file
If ( fl_nbr <> 0 ) Then
fl_nbr = fl_nbr + 1
Write_All_Chained_FileName_in_Out
End If



' Write end of Out XML file ?
If ( Not Default_my_or_Xml ) Then
Write_XML_Footer
End If

' Write end of Out WMP9 PL file ?
If Create_WMP_PLayList And (fl_nbr <> 0) Then
Write_WMP_PL_Footer()
End If

' Close Out file
End_With_Out_File

' ---------------------------------------8<---------------------------------------
If ( Get_mms_link Or Get_mms_link_truncated ) Then
' If we get the mms links, we do not need anymore the ASX files...
If Del_DL_ASX_files Then
' Delete ASX files
Delete_Asx_Files
End If
End If

' ---------------------------------------8<---------------------------------------
If ( ProgressWindow ) Then
Message_Popup_Close
End If

If (fl_nbr <= 1) Then
MsgBox "Pas de fichier streaming asx trouvé pour " & Chr(34) & Search_String & Chr(34), 16, Script_Title
Else

' Move file... ?
If Do_Move_Action Then
Set fsoMv = CreateObject("Scripting.FileSystemObject")
' Create 'dest file' name
If ( Default_my_or_Xml ) Then
DestPath = Database_Path & "\" & OutFileTitle & ".my"
Else
DestPath = Database_Path & "\" & OutFileTitle & ".xml"
End If
' Delete destination file if exists...
If ( fsoMv.FileExists(DestPath) ) Then
fsoMv.DeleteFile(DestPath)
End If
fsoMv.MoveFile OutPath , Database_Path
End If

' Show a message box ?
If Show_Message_At_End Then
Msg_WMP_PL = ""
Msg_Ext = ""
If ( Create_WMP_PLayList ) Then
Msg_WMP_PL = " et [ " & OutFileTitlePL & ".wpl ] "
Msg_Ext = "s"
End If
If ( Default_my_or_Xml ) Then
MsgBox "Fichier [ " & OutFileTitle & ".my ]" & Msg_WMP_PL & " généré" & Msg_Ext & " pour " & Chr(34) & Search_String & Chr(34), 64, Script_Title
Else
MsgBox "Fichier [ " & OutFileTitle & ".xml ]" & Msg_WMP_PL & " généré" & Msg_Ext & " pour " & Chr(34) & Search_String & Chr(34), 64, Script_Title
End If
End If
End If
If ( Tell_me_when_finished_Play_a_Wav ) Then
ReturnVal = WshShellWav.run (chr(34)&WavExeTool&chr(34)&" "&chr(34)&WavAudioFile&chr(34),0,TRUE)
End If

Wscript.Quit
' ---------------------------------------8<---------------------------------------















' ---------------------------------------8<---------------------------------------
' ---------------------------------------8<---------------------------------------
Function Delete_Asx_Files()
Set FSO_ToDelete = CreateObject("Scripting.FileSystemObject")

' Create a sample asx file
SampleFile_Name = Current_Path & "\sample.asx"
Set FileLink = FSO_ToDelete.CreateTextFile(SampleFile_Name)
FileLink.Close

' Delete old files '.asx'
If ( FSO_ToDelete.FileExists(SampleFile_Name) )Then
' If file exists, delete it
FSO_ToDelete.DeleteFile(Current_Path & "\*.asx*")
End If
End Function

Function Extract_Full_CommandLine_args()
Token_Cmd = ""
For i = 0 To WScript.Arguments.Count-1
Token_Cmd = Token_Cmd + WScript.Arguments(i)
Next
Extract_Full_CommandLine_args = Token_Cmd
End Function

Function Replace_Special_XML_Caracters(TokenBase)
If Replace_XML_Charaters Then
TokenBase = Replace(TokenBase,"&","&amp;")
TokenBase = Replace(TokenBase,"'","&apos;")
TokenBase = Replace(TokenBase,"é","é")
TokenBase = Replace(TokenBase,"è","è")
TokenBase = Replace(TokenBase,"ê","ê")
TokenBase = Replace(TokenBase,"à","à")
TokenBase = Replace(TokenBase,"á","á")
TokenBase = Replace(TokenBase,"â","â")
TokenBase = Replace(TokenBase,"ä","ä")
TokenBase = Replace(TokenBase,"æ","æ")
TokenBase = Replace(TokenBase,"å","å")
TokenBase = Replace(TokenBase,"ç","ç")
TokenBase = Replace(TokenBase,"ë","ë")
TokenBase = Replace(TokenBase,"ñ","ñ")
TokenBase = Replace(TokenBase,"ô","ô")
TokenBase = Replace(TokenBase,"ò","ò")
TokenBase = Replace(TokenBase,"ó","ó")
TokenBase = Replace(TokenBase,"ö","ö")
TokenBase = Replace(TokenBase,"ù","ù")
TokenBase = Replace(TokenBase,"ú","ú")
TokenBase = Replace(TokenBase,"û","û")
TokenBase = Replace(TokenBase,"ü","ü")
TokenBase = Replace(TokenBase,"ì","ì")
TokenBase = Replace(TokenBase,"í","í")
TokenBase = Replace(TokenBase,"î","î")
TokenBase = Replace(TokenBase,"ï","ï")
TokenBase = Replace(TokenBase,"°","˚")
TokenBase = Replace(TokenBase,"˜","˜")
TokenBase = Replace(TokenBase,"º","º")
TokenBase = Replace(TokenBase,"ˆ","ˆ")
TokenBase = Replace(TokenBase,"“","“")
TokenBase = Replace(TokenBase,"”","”")
TokenBase = Replace(TokenBase,"‘","‘")
TokenBase = Replace(TokenBase,"’","’")
TokenBase = Replace(TokenBase,"À","À")
TokenBase = Replace(TokenBase,"Á","Á")
TokenBase = Replace(TokenBase,"Â","Â")
TokenBase = Replace(TokenBase,"Ã","Ã")
TokenBase = Replace(TokenBase,"Ä","Ä")
TokenBase = Replace(TokenBase,"Å","Å")
TokenBase = Replace(TokenBase,"Æ","Æ")
TokenBase = Replace(TokenBase,"Ç","Ç")
TokenBase = Replace(TokenBase,"È","È")
TokenBase = Replace(TokenBase,"É","É")
TokenBase = Replace(TokenBase,"Ê","Ê")
TokenBase = Replace(TokenBase,"Ë","Ë")
TokenBase = Replace(TokenBase,"Ì","Ì")
TokenBase = Replace(TokenBase,"Í","Í")
TokenBase = Replace(TokenBase,"Î","Î")
TokenBase = Replace(TokenBase,"Ï","Ï")
TokenBase = Replace(TokenBase,"Ð","Ð")
TokenBase = Replace(TokenBase,"Ñ","Ñ")
TokenBase = Replace(TokenBase,"Ò","Ò")
TokenBase = Replace(TokenBase,"Ó","Ó")
TokenBase = Replace(TokenBase,"Ô","Ô")
TokenBase = Replace(TokenBase,"Õ","Õ")
TokenBase = Replace(TokenBase,"Ö","Ö")
TokenBase = Replace(TokenBase,"×","×")
TokenBase = Replace(TokenBase,"Ø","Ø")
TokenBase = Replace(TokenBase,"Ù","Ù")
TokenBase = Replace(TokenBase,"Ú","Ú")
TokenBase = Replace(TokenBase,"Û","Û")
TokenBase = Replace(TokenBase,"Ü","Ü")
TokenBase = Replace(TokenBase,"Ý","Ý")
TokenBase = Replace(TokenBase,"Œ","Œ")
TokenBase = Replace(TokenBase,"œ","œ")
TokenBase = Replace(TokenBase,"ƒ","ƒ")

TokenBase = Replace(TokenBase,"!","!")
TokenBase = Replace(TokenBase,"?","?")
TokenBase = Replace(TokenBase,"%","%")
TokenBase = Replace(TokenBase,"'","'")
TokenBase = Replace(TokenBase,chr(34),""")
End If
Replace_Special_XML_Caracters = TokenBase
End Function

Function Start_With_OutPL_File()
Set FSO_OutPL = CreateObject("Scripting.FileSystemObject")
Set OutFilePL = FSO_OutPL.CreateTextFile(OutPathPL)
End Function

Function End_With_OutPL_File()
OutFilePL.Close
End Function

Function Start_With_Out_File()
Set FSO_Out = CreateObject("Scripting.FileSystemObject")
Set OutFile = FSO_Out.CreateTextFile(OutPath)
Set FSO_mms = CreateObject("Scripting.FileSystemObject")
Set mmsFile = FSO_mms.CreateTextFile(mmsFileTitle)
Set FSO_ren = CreateObject("Scripting.FileSystemObject")
Set renFile = FSO_ren.CreateTextFile(RenFileTitle)
End Function

Function End_With_Out_File()
renFile.Close
mmsFile.Close
OutFile.Close
End Function

Function Write_WMP_PL_Header()
OutFilePL.WriteLine("<?wpl version=" & Chr(34) & "1.0" & Chr(34) & "?>")
OutFilePL.WriteLine("<smil>")
OutFilePL.WriteLine(" <head>")
OutFilePL.WriteLine(" <meta name=" & Chr(34) & "Generator" & Chr(34) & " content=" & Chr(34) & "Microsoft Windows Media Player -- 9.0.0.3075" & Chr(34) & "/>")
OutFilePL.WriteLine(" <author/>")
OutFilePL.WriteLine(" <title>WMP_Playlist</title>")
OutFilePL.WriteLine(" </head>")
OutFilePL.WriteLine(" <body>")
OutFilePL.WriteLine(" <seq>")
End Function

Function Write_WMP_PL_Footer()
OutFilePL.WriteLine(" </seq>")
OutFilePL.WriteLine(" </body>")
OutFilePL.WriteLine("</smil>")
OutFilePL.WriteLine("")
End Function

Function Write_XML_Header()
OutFile.WriteLine("<?Out version="&Chr(34)&"1.0"&Chr(34)&" encoding="&Chr(34)&"UTF-8"&Chr(34)&"?>")
OutFile.WriteLine("<database>")
OutFile.WriteLine("<sortorder>title</sortorder>")
OutFile.WriteLine("<sortable>")
OutFile.WriteLine("<sort>title</sort>")
OutFile.WriteLine("<sort>artist</sort>")
OutFile.WriteLine("</sortable>")
OutFile.WriteLine("<template>" & Replace_Special_XML_Caracters(Search_String) & " - Yahoo Clip Streaming search</template>")
OutFile.WriteLine("<paths>")
OutFile.WriteLine("<path></path>")
OutFile.WriteLine("</paths>")
OutFile.WriteLine("")
End Function

Function Write_XML_Footer()
OutFile.WriteLine("</database>")
End Function

Function Extract_Artist_Name(TokenBase)
Pos = InStr(TokenBase," - ") - 1
Extract_Artist_Name = Left(TokenBase,Pos)
End Function

Function Extract_Title_Name(TokenBase)
TokenBase = TokenBase
TokenTmp = Replace(TokenBase,".asx","")
Pos = InStr(TokenTmp," - ") + 3
Extract_Title_Name = Mid(TokenTmp,Pos)
End Function

Function Extract_mms_link_from_asx(Asx_FileName)
Dim FSO_mms, mmsFile, TokenRes, Token
Token = Asx_FileName
Set FSO_mms = CreateObject("Scripting.FileSystemObject")
Set mmsFile = FSO_Out.OpenTextFile(Token,1)
TokenRes = mmsFile.ReadLine
mmsFile.Close
' Delete the [return carriage] character at end of "TokenRes" line
Pos = Len(TokenRes) - 1
TokenRes = Left(TokenRes,Pos)
Extract_mms_link_from_asx = TokenRes
End Function

Function Extract_mms_link_truncated_from_asx(Asx_FileName)
Dim FSO_mms, mmsFile, TokenRes, Token
Token = Asx_FileName
Set FSO_mms = CreateObject("Scripting.FileSystemObject")
Set mmsFile = FSO_Out.OpenTextFile(Token,1)
TokenRes = mmsFile.ReadLine
mmsFile.Close
Pos = InStr(TokenRes,"?StreamID") - 1
TokenRes = Left(TokenRes,Pos)
Extract_mms_link_truncated_from_asx = TokenRes
End Function

Function Write_Asx_FileName_in_Out()
If ( Default_my_or_Xml ) Then
' my_File - Title/Artist header
OutFile.WriteLine("[" & fl_nbr & "]")
OutFile.WriteLine("Title=" & Replace(Asx_FileName,".asx",""))
OutFile.WriteLine("Category=Artiste," & Chr(34) & Extract_Artist_Name(Asx_FileName) & Chr(34))
OutFile.WriteLine("Category=Titre," & Chr(34) & Extract_Title_Name(Asx_FileName) & Chr(34))
Else
' Asx_FileName - Title/Artist header
OutFile.WriteLine(" <item>")
OutFile.WriteLine(" <display>" & Replace_Special_XML_Caracters(Extract_Title_Name(Asx_FileName)) & "</display>")
OutFile.WriteLine(" <information>")

OutFile.WriteLine(" <artist>" & Replace_Special_XML_Caracters(Extract_Artist_Name(Asx_FileName)) & "</artist>")
OutFile.WriteLine(" <title>" & Replace_Special_XML_Caracters(Extract_Title_Name(Asx_FileName)) & "</title>")

OutFile.WriteLine(" </information>")
End If

If ( Get_mms_link And Not Get_mms_link_truncated ) Then
' Write complete mms link (extracted from asx file)
mms_link = Extract_mms_link_from_asx(Asx_FileName)

If ( Default_my_or_Xml ) Then
OutFile.WriteLine("chain=" & Chr(34) & "link" & Chr(34) & "," & Chr(34) & mms_link & Chr(34))
All_Chained = All_Chained & Chr(34) & mms_link & Chr(34) & " "
Else
OutFile.WriteLine(" <parameter>" & Replace_Special_XML_Caracters(mms_link) & "</parameter>")
End If
Else
If Get_mms_link_truncated Then
' Write truncated mms link (extracted from asx file)
mms_link = Extract_mms_link_truncated_from_asx(Asx_FileName)
If ( Default_my_or_Xml ) Then
OutFile.WriteLine("chain=" & Chr(34) & "link" & Chr(34) & "," & Chr(34) & mms_link & Chr(34))
All_Chained = All_Chained & Chr(34) & mms_link & Chr(34) & " "
Else
OutFile.WriteLine(" <parameter>" & Replace_Special_XML_Caracters(mms_link) & "</parameter>")
End If
Else
If Add_Path Then
' Write ASX life link with full path
If ( Default_my_or_Xml ) Then
OutFile.WriteLine("chain=" & Chr(34) & "link" & Chr(34) & "," & Chr(34) & Current_Path&Asx_FileName & Chr(34))
All_Chained = All_Chained & Chr(34) & Current_Path&Asx_FileName & Chr(34) & " "
Else
OutFile.WriteLine(" <parameter>" & Replace_Special_XML_Caracters(Current_Path&Asx_FileName) & "</parameter>")
End If
Else
' Write ASX life link without full path (only file name)
If ( Default_my_or_Xml ) Then
OutFile.WriteLine("chain=" & Chr(34) & "link" & Chr(34) & "," & Chr(34) & Asx_FileName & Chr(34))
All_Chained = All_Chained & Chr(34) & Asx_FileName & Chr(34) & " "
Else
OutFile.WriteLine(" <parameter>" & Replace_Special_XML_Caracters(Asx_FileName) & "</parameter>")
End If
End If
End If
End If

If ( Not Default_my_or_Xml ) Then
If Set_ASX_in_parameter2 And Not Del_DL_ASX_files Then
If Add_Path Then
OutFile.WriteLine(" <parameter2>" & Replace_Special_XML_Caracters(Current_Path&Asx_FileName) & "</parameter2>")
Else
OutFile.WriteLine(" <parameter2>" & Replace_Special_XML_Caracters(Asx_FileName) & "</parameter2>")
End If
End If
End If


If ( Not Default_my_or_Xml ) Then
OutFile.WriteLine(" </item>")
End If

OutFile.WriteLine("")

' Write WMP9 PL file informations ?
If Create_WMP_PLayList Then
OutFilePL.WriteLine(" <media src=" & Chr(34) & Replace_Special_XML_Caracters(Current_Path&Asx_FileName) & Chr(34) & "/>")
End If
End Function

Function Write_All_Chained_FileName_in_Out()
If ( Default_my_or_Xml ) Then
' my_File - Title/Artist header
OutFile.WriteLine("[" & fl_nbr & "]")
OutFile.WriteLine("Title=- All Artists Clips -")
OutFile.WriteLine("Category=Artiste," & Chr(34) & "- All Artists Clips -" & Chr(34))
OutFile.WriteLine("Category=Titre," & Chr(34) & "- All Artists Clips -" & Chr(34))
OutFile.WriteLine("chain=link," & All_Chained)
End If
End Function

' ---------------------------------------8<---------------------------------------
' ---------------------------------------8<---------------------------------------

Function Browse_asx_to_Extract_wmv_infos()
mms_link = Extract_mms_link_from_asx
mms_link_full = Extract_mms_link_full_from_asx
mms_video_name = Asx_FileName
' MsgBox mms_video_name & " -> " &mms_link
End Function
Function Add_infos_to_mmsFile_and_renFile()
mmsFile.WriteLine(mms_link)
If ( InStr(mms_link,".wmv") ) Then
renFile.WriteLine("mmsclient '" & mms_link_full & "' '" & Replace(mms_video_name,".asx",".wmv") &"'")
Else
renFile.WriteLine("mmsclient '" & mms_link_full & "' '" & Replace(mms_video_name,".asx",".asf") &"'")
End If
End Function
Function Extract_mms_link_from_asx()
Dim FSO_asx, asxFile, TokenRes, Token
Token = Asx_FileName
Set FSO_asx = CreateObject("Scripting.FileSystemObject")
Set asxFile = FSO_asx.OpenTextFile(Token,1)
TokenRes = asxFile.ReadLine
asxFile.Close
' Delete the [return carriage] character at End of "TokenRes" line
Pos = InStr(TokenRes,"?StreamID") - 1
TokenRes = Left(TokenRes,Pos)
Extract_mms_link_from_asx = TokenRes
End Function

Function Extract_mms_link_full_from_asx()
Dim FSO_mms, mmsFile, TokenRes, Token
Token = Asx_FileName
Set FSO_asx = CreateObject("Scripting.FileSystemObject")
Set asxFile = FSO_asx.OpenTextFile(Token,1)
TokenRes = asxFile.ReadLine
asxFile.Close
' Delete the [return carriage] character at end of "TokenRes" line
Pos = Len(TokenRes) - 1
TokenRes = Left(TokenRes,Pos)
Extract_mms_link_full_from_asx = TokenRes
End Function
' ---------------------------------------8<---------------------------------------
' ---------------------------------------8<---------------------------------------

' ------------------------------------------------8<------------------------------------------------
Dim objExplorer

Function Message_Popup_Init(Title)
Set objExplorer = WScript.CreateObject ("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width=450
objExplorer.Height = 150
objExplorer.Left = 300
objExplorer.Top = 400
objExplorer.Visible = 1
objExplorer.Document.Title = "... " & Title & " ......................................"
End Function
Function Message_Popup_Close()
objExplorer.Quit
End Function
Function Message_Popup_Write(Wline1,Wline2)
LeftPartLine = "<center><font size='2' face='Verdana,Arial,Helvetica'><b>"
MiddlePartLine = ""
If Indent<IndentTot+1 Then
MiddlePartLine = left(left(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",Indent)&"==============================",IndentTot)
End If
RightPartLine = "</b></font><center>"
If ( Len(Wline1) <> 0 ) Then
MiddlePartLine = MiddlePartLine &"<BR>"& Wline1
End If
If ( Len(Wline2) <> 0 ) Then
MiddlePartLine = MiddlePartLine &"<BR>"& Wline2
End If
objExplorer.Document.Body.InnerHTML = LeftPartLine & MiddlePartLine & RightPartLine
End Function
' ------------------------------------------------8<------------------------------------------------
rhinton
 
Posts: 1
Joined: Tue Apr 26, 2005 9:55 am

Postby evndude on Thu Jun 02, 2005 5:40 am

I'm getting the same error that rhinton is.

Is there any way to fix it? The exact error is:

Code: Select all
Script:    C:\Program Files\XlobbyFr\applications\myLAUNCH\myLaunch_to_FileList.vbs
Line:      498
Char:      2
Error:     Invalid procedure call or argument: 'Left'
Code:      800A0005
Source:    Microsoft VBScript runtime error
evndude
 
Posts: 1
Joined: Thu Jun 02, 2005 5:36 am

Postby dgemily on Fri Jun 03, 2005 9:21 pm

sorry guys, but there is a problème with mylaunch.exe for yahooUS,
atari800 built a new exe but now it's not compatible with the actual .vbs, we need to rebuild the script and I can't do it....
dgemily
 
Posts: 793
Joined: Thu May 13, 2004 6:24 am
Location: Paris, France

Postby rika on Thu Oct 27, 2005 9:46 am

Is this working now, for yahooUS or fra ?
(Can´t get this to work, script runs fine but i don´t get any videos)

Rika
rika
 
Posts: 401
Joined: Fri Apr 02, 2004 5:43 am
Location: Sweden

Postby dgemily on Thu Oct 27, 2005 10:13 am

rika wrote:Is this working now, for yahooUS or fra ?
(Can´t get this to work, script runs fine but i don´t get any videos)

Rika


TheLynx ( a member of the French team) rebuilt the vbs and we added some changes, I Will post the new application soon.... (need some checks)

later
dgemily
 
Posts: 793
Joined: Thu May 13, 2004 6:24 am
Location: Paris, France

PreviousNext