leecole Posted January 4, 2006 Share Posted January 4, 2006 (edited) First, I confess, I don't know the first thing about HTML. Here is my program. It is designed to be driven by clicking double-click of a AVI , MPG, or WMV recording in Explorer, or choosing OPEN, or Play. The object is to bring up a msagent to MC the program, by reading list of actors, then reading a plot synopsis. Then play the recording. That's the scenerio. The program is set up so you don't have to have any recording. It accesses www.tv.com, looks up the series. Gets a list of episodes, then accesses the episode I am interested in. It pulls up a summary and what I need help with, is retrieving the text that is visible (without the ads). I can handle the rest. Can someone help? The Source of the Final screen is attached: expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: Lee Cole <leecole@igfoot.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- #Compiler_Res_Comment=;Comment field #Compiler_Res_Description= ;Description field #Compiler_Res_Fileversion=1.0.0.0 ;File Version #Compiler_Res_LegalCopyright=Lee Cole leecole@bigfoot.com;Copyright field #Compiler_Res_Field=Email:|Lee Cole leecole@bigfoot.com |Subject: AutoXvid ; Script Start - Add your code below here Global $TvFolder Global $TvFilename Global $TVSeries Global $TVEpisode Global $TvFormat Global $TvChannel Global $TvUniqueId Func DescribeTV($tvin) Local $_i, $_y $_i = StringInStr($tvin, "\", 0, -1); Break between Path and Filename $TvFolder = StringTrimRight($tvin, StringLen($tvin) - $_i + 1); Path $_y = StringInStr($tvin, ".", 0, -1); added to handle filename.tp 2.0.1.2 ;$TvFilename=StringTrimRight(StringTrimLeft($tvin,$_i),4); Filename 2.0.1.2 $TvFilename = StringTrimRight(StringTrimLeft($tvin, $_i), StringLen($tvin) - $_y + 1); Filename changed to handle filename.tp 2.0.1.2 $TvFormat = StringRight($tvin, StringLen($tvin) - $_y); FileType changed to handle filename.tp 2.0.1.2 ;$TvFormat=StringRight($tvin,3); FileType 2.0.1.2 If StringInStr($TvFilename, "-(") Then $TvSeries = StringLeft($TvFilename, StringInStr($TvFilename, "-(") - 1) Else $TvSeries = StringLeft($TvFilename, StringInStr($TvFilename, "-", 0, 1) - 1) EndIf $_i = StringInStr($TvFilename, "(", 1, -1) $_y = StringInStr($TvFilename, ")", 1, -1) If $_i > 0 And $_y > 0 And $_y > $_i Then; We have a Series $TvEpisode = StringTrimRight($TvFilename, StringLen($TvFilename) - $_y + 1) $TvEpisode = StringRight($TvEpisode, $_y - 1 - $_i) Else; special, movie, news, or reality show $TvEpisode = "Movie, Reality, or a Tv Special" EndIf $TvUniqueId = 1 Return EndFunc ;==>DescribeTV #include <IE.au3> $input=$CmdLineRaw if $input="" Then $input="My Name Is Earl-(White Lie Christmas)-2005-12-06-0_cut.avi" DescribeTV($input) $o_IE = _IECreate () _IENavigate ($o_IE, "http://www.tv.com/search.php?type=11&stype=all&qs=" & $TvSeries, 1) _IEClickLinkByText($o_IE, $TvSeries, 0, 1) $Url = _IEGetProperty($o_IE, "locationurl") $Url = StringLeft($Url,StringInStr($Url,"/summ",-1)) & "episode_listings.html" _IENavigate ($o_IE, $Url, 1) $doc = $o_IE.document $links = $doc.links For $link In $links $linkText = $link.outerText & ""; Append empty string to prevent problem with no outerText (image) links If StringInStr($linkText, $TvEpisode) Then $result = $link.click _IELoadWait($o_IE) ExitLoop EndIf Next MsgBox(0,"test","We are there!") _IEQuit($o_IE)summary.txt Edited January 4, 2006 by leecole Talking Clockhttp://www.autoitscript.com/forum/index.php?showtopic=20751Talking Headlineshttp://www.autoitscript.com/forum/index.php?showtopic=20655Sometimes, I sits and thinkssometimes, I just sits Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now