tkminh Posted December 6, 2010 Share Posted December 6, 2010 Hi everyone, I just made a small program to learn Listening English, from website VOA. It will get content from source VOA, download file audio mp3, and translate to selected language, in this case is Vietnamese. Please download in attachment. Hope you can use it easily, then give me comment or bug. VOA - learning 1.1.au3 Visit my blogMua bán ô tô, xe hơi, tuyển dụng việc làm Link to comment Share on other sites More sharing options...
ldub Posted December 6, 2010 Share Posted December 6, 2010 (edited) Hi everyone,I just made a small program to learn Listening English, from website VOA. It will get content from source VOA, download file audio mp3, and translate to selected language, in this case is Vietnamese. Please download in attachment.Hope you can use it easily, then give me comment or bug. I do like your idea but I get errors after it has been loaded : "Error" without explanations and crash !I can see the text and the translation but I cannot go further. There is a sound problem.I don't know which file must be played : the one on the site, or the file in the current directory.Your code is not sufficently documented for me.A progress bar should be also very usefull.Thanks,(French Windows XP) Edited December 6, 2010 by ldub Link to comment Share on other sites More sharing options...
StopError Posted January 27, 2011 Share Posted January 27, 2011 Ok, found your error. You set the filename as the title. When file was downloaded via InetGet it renamed sound file to one that could be saved. Revisions: #region Main dim $oIE dim $sound dim $arrHREF[1] dim $soundLength dim $MyFileName ;added variable for file name For $oLink in $oLinks $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, "download MP3") Then dim $hDownload $MyFileName = String(getFileName($oLink.href)) ;save name file to be saved as $hDownload = InetGet($oLink.href, getFileName($oLink.href) & "",1,1) Do Sleep(250) Until InetGetInfo($hDownload, 2) ExitLoop EndIf Next $contentResult = getTranslate($contentSource) _GUICtrlRichEdit_SetText ($theSource,$contentSource) _GUICtrlRichEdit_SetText ($theResult,$contentResult) loadSound($MyFileName) ;loading correct filename ;loadSound($title & ".mp3") ; commented out your line Sleep(1000) Things to think on. 1: is there a better way to check the Internet connection? (I get 2 cmd boxes. one is from the ping.exe command. Don't see command for second box.) 2: File Cleanup. a: name mp3 files with same name, one you specify. (Example: soundclip.mp3) b: create separate directory and delete *.mp3 on exit 3: Error cleanup and exit cleanup. I found a bunch of iexplorer.exe (hidden) that I had to end task while debugging this. Also found this when I exit via windows close X. 4: some display issues with your sound bar. 5: if you select another article while 'Select' button is gray. Then click select again. It does not select new article. (Gray out list while loading also?) 5: Functionality: Add a way to click/highlight one or more words on left textbox, and have translated text highlight. This would require much more work. Probably multiple Google translate sessions. 6: More language support (Site has many languages.) PS - Using Windows XP US English version over all found it an intereasting project. 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