gcue Posted November 30, 2010 Posted November 30, 2010 (edited) I am trying to download an update of bloomberg - problem is that the file name changes every month. "Update the Bloomberg Application" Here is where i get the error $aResult = StringRegExp($sHTML, "(?i)(?s)(?U:<p><strong>Bloomberg Application.+</p>)", 3) id really appreciate any help anyone can give me! thanks in advance here is the script ; Get Software Update page source $sHTML = _INetGetSource("http://www.bloomberg.com/professional/software_support/") If @error Then BloombergUpdater_error() Return EndIf MsgBox(0, "", $sHTML) ;Parse Bloomberg Application paragraph section $aResult = StringRegExp($sHTML, "(?i)(?s)(?U:<p><strong>Bloomberg Application.+</p>)", 3) If @error Then BloombergUpdater_error() Return EndIf $sBAParagraph = $aResult[0] ;Parse version information $aResult = StringRegExp($sBAParagraph, "(?i)\((.+)\)", 3) If @error Then BloombergUpdater_error() Return EndIf $sVersionInfo = $aResult[0] ;Parse download hyperlink $aResult = StringRegExp($sBAParagraph, '(?i)(?U)<a.+"(.+)"', 3) If @error Then BloombergUpdater_error() Return EndIf $sDLLink = $aResult[0] $iSize = InetGetSize($sDLLink) Edited November 30, 2010 by gcue
iamtheky Posted November 30, 2010 Posted November 30, 2010 How much does the name change? #include <array.au3> #include <INet.au3> ; Get Software Update page source $sHTML = _INetGetSource("http://www.bloomberg.com/professional/software_support/") If @error Then Else EndIf ;~ MsgBox(0, "", $sHTML) ;Parse Bloomberg Application exe name $aResult = Stringregexp($sHTML, "http://bdn-ak.bloomberg.com/software/trv/upgr\d\d\d\d\d\d.exe", 2) If @error Then msgbox (0, '' , @ERROR) Else EndIf ;~ _ArrayDisplay ($aResult) inetget ($aResult[0] , @scriptdir & "\BloombergUpgrade.exe") ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
gcue Posted November 30, 2010 Author Posted November 30, 2010 upgr*.exe would always fit i think. the * ends up being the date its released. thannks for your help! ill try it out.
gcue Posted November 30, 2010 Author Posted November 30, 2010 works like a charm!!! many many many thanks!!!!
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