KF5WGB Posted October 12, 2019 Posted October 12, 2019 Hi @all, The web-address where the image is created is: http://www.hamqsl.com/solar101pic.php One solution was to create an object with IECreateEmbedded() and it works fine...until I added the meta tag refresh. Then the image gets "messed' up. The vertical and horizontal scrollbars show up. It all started here: Now I am thinking, what if I just download the created pic and run a timer for 30 minutes and then re-download the image and refresh the pic in the GUI. I tried the winhttp approach $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "http://www.hamqsl.com/solar.html", False) $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status If $oStatusCode == 200 then $file = FileOpen("solardata.gif", 2) ; The value of 2 overwrites the file if it already exists FileWrite($file, $oReceived) FileClose($file) EndIf but that does not work with a server side created picture. Is there a way to downlaod that image? Thanks for any advice. KF5WGB
Musashi Posted October 12, 2019 Posted October 12, 2019 (edited) 55 minutes ago, KF5WGB said: Is there a way to download that image? Thanks for any advice. Have you tried InetGet Edited October 12, 2019 by Musashi "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
KF5WGB Posted October 12, 2019 Author Posted October 12, 2019 (edited) 34 minutes ago, Musashi said: Have you tried InetGet Duuuhh. Thanks Musashi. Completely forgot about that one. Now I have this problem. If the picture was downloaded once before , the next one will be from the Cache and not from the website. #include <MsgBoxConstants.au3> if FileExists(@ScriptDir & "\solardata.gif") Then ConsoleWrite("erasing old pic" & @CRLF) FileDelete(@ScriptDir & "\solardata.gif") EndIf InetGet("http://www.hamqsl.com/solar101pic.php","solardata.gif") Any idea how to clear the cache? Edited October 12, 2019 by KF5WGB forgot something
Musashi Posted October 12, 2019 Posted October 12, 2019 (edited) 22 minutes ago, KF5WGB said: Any idea how to clear the cache? -> InetGet -> Options : $INET_FORCERELOAD (1) = Forces a reload from the remote site . Edited October 12, 2019 by Musashi FrancescoDiMuro 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
KF5WGB Posted October 12, 2019 Author Posted October 12, 2019 1 hour ago, Musashi said: -> InetGet -> Options : $INET_FORCERELOAD (1) = Forces a reload from the remote site . That did the trick. Vielen Dank und schönes Wochenende. KF5WGB
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