Hi
I need your help about this script.
What I want to do is just get the data between the <title>Data to extracted </title> and <!-Mfunc->Data to be extracted<!--/mfunc-->
So if someone here is kind enough to correct me the syntax pattern to achieve my goal.
Thank you !
I need your help about this script.
What I want to do is just get the data between the <title>Data to extracted </title> and <!-Mfunc->Data to be extracted<!--/mfunc-->
So if someone here is kind enough to correct me the syntax pattern to achieve my goal.
Thank you !
Code:
Dim Titre,URL,ie,objFSO,Data,OutPut,objRegex,Match,Matches
Titre = "Notification de Giveawayoftheday © Hackoo © 2013"
URL = "[URL unfurl="true"]http://fr.giveawayoftheday.com/"[/URL]
Set ie = CreateObject("InternetExplorer.Application")
Set Ws = CreateObject("wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
ie.Navigate (URL)
ie.Visible=false
DO WHILE ie.busy
wscript.sleep 100
LOOP
Data = ie.document.documentElement.innerHTML
ie.Quit
Question = MsgBox(RegExp("<title>(.*?)</title>")&vbcr&vbcr&_
" Le temps restant est :" &vbcr&vbcr&_
RegExp("<!--mfunc-->(.*?)<!--/mfunc-->")&vbcr&vbcr&_
"Voulez-vous accéder au site : [URL unfurl="true"]http://fr.giveawayoftheday.com/[/URL] ?",VBYesNO+VbQuestion,Titre)
If Question = VbYes then
Ws.Run "[URL unfurl="true"]http://fr.giveawayoftheday.com/",1,False[/URL]
else
Wscript.Quit
end if
Set ie = Nothing
Function RegExp(Motif)
Set objRegex = new RegExp
objRegex.Pattern = Motif 'Motif pour y extraire le code source
objRegex.Global = False 'une seule instance
objRegex.IgnoreCase = True 'Ignorer la casse
Set Matches = objRegex.Execute(Data) 'Execution du la RegExp
For Each Match in Matches
strMatchValue = Match.Value
RegExp = strMatchValue
Next
End Function