JanF Posted April 8, 2008 Share Posted April 8, 2008 Hi all! I am trying to make a new page for the NewDef skin that I would like to display the current traffic in the Copenhagen area. The URL for the content is: http://vd.adapt.dk/index_kbh_dk.html Using the Skineditor I cannot seem to find an element that allows me to insert the above URL?? Can anyone give me a hinter or two? Be warned - I am in no way a programmer Thanks in advance Jan Quote Link to comment
Tjod Posted April 8, 2008 Share Posted April 8, 2008 As fare as i know it is not possible. (For a Programmer it should be possible. A start point is may be this) Quote Link to comment
JanF Posted April 8, 2008 Author Share Posted April 8, 2008 As fare as i know it is not possible. (For a Programmer it should be possible. A start point is may be this) Thanks for the heads-up - I took a look, but for a programmer you are right - it could be a starting point :-) I do not need any control - just to have a page I can access from the HTPC-home menu that will show the URL.. Quote Link to comment
hackbart Posted April 8, 2008 Share Posted April 8, 2008 You should search for the internet plugin i published (2 years ago, i guess). It was just a sample plugin, but explains how to embedd the explorer into the osd. Quote Link to comment
JanF Posted April 10, 2008 Author Share Posted April 10, 2008 You should search for the internet plugin i published (2 years ago, i guess). It was just a sample plugin, but explains how to embedd the explorer into the osd. Hi Hackbart If you mean the plugin named MyInternet I already took a look - but it seems to be an uncompiled fully functional explorer - not excatly what I need (...and I would not have a clue on how to use / compile it ) I was thinking something in the line of MyWeather - but instead of the forecast, the main window should simply display the content from the URL above... Maybe a page where one could simply enter the default URL to display?? Which could be usefull for others?? Quote Link to comment
hackbart Posted April 10, 2008 Share Posted April 10, 2008 What you can do is creating a script which starts the attached binary multiple times. The tool allows to save the website as jpg on your harddisk. If you now add this image to your skin you should be able to see the traffic in your area. The parameter works like this: webdump http://vd.adapt.dk/index_kbh_dk.html traffic.jpg procedure TfrmWebbrowser.GenerateBitmap(Bitmap: TBitmap); var srcRect: TRect; aViewObject: IViewObject; W, H: Integer; begin aViewObject := Webbrowser.ControlInterface as IViewObject; if aViewObject = nil then Exit; H := Webbrowser.OleObject.Document.ParentWindow.Screen.Height; W := Webbrowser.OleObject.Document.ParentWindow.Screen.Width; WebBrowser.Height := H; WebBrowser.Width := W; Webbrowser.Realign; Bitmap.Width := W; Bitmap.Height := H; srcRect := Rect(0, 0, Bitmap.Width, Bitmap.Height); OleCheck(aViewObject.Draw(DVASPECT_CONTENT, 1, nil, nil, Handle, Bitmap.Canvas.Handle, @srcRect, nil, nil, 0)); end; The program just uses the webbrowser ability to save the content as bitmap and i'm quite sure this can be also done inside a script. Christian WebDump.zip Quote Link to comment
JanF Posted April 10, 2008 Author Share Posted April 10, 2008 Christian - this seems like the almost perfect solution!! The Webdump.exe works perfectly with most pages I have tried, but unfortunately not with the above page in question :-( The page containes a Java Applet - when I try to "grap" the page with the utility, it simply generates an hs_err_pid****.log?? Hope you will keep trying - I really appreciate your help!! /jan Quote Link to comment
JanF Posted April 10, 2008 Author Share Posted April 10, 2008 UPDATE Updated my Jave to the Version 6 Update 5 - I no longer get the error-log, but just a blank *.jpg-file... Quote Link to comment
JanF Posted April 19, 2008 Author Share Posted April 19, 2008 I am close to a solution - is there anyway I can get wepdump.exe to use a wait-timer?? I would like it to start - give the webpage 10 secs. to load completely, and then make the .jpg snapshot.?? Quote Link to comment
hackbart Posted April 19, 2008 Share Posted April 19, 2008 The attached zip contains the binary and the source. In theory you could create a application which hides itself in the tray and refreshs the stream periodically - but i guess this simple tool should work in your case. webbrowser url filename [delay in seconds] Christian webbrowser.zip Quote Link to comment
JanF Posted April 19, 2008 Author Share Posted April 19, 2008 Christian - thanks - works perfectly!! Is it possible to ad the option to set the size of the captured image?? When I grab the above URL with the 10 sec delay, I get a huge image, but really only need the top left corner cut 650x650..?? Quote Link to comment
JanF Posted April 29, 2008 Author Share Posted April 29, 2008 Hi Christian (and others ) webbrowser.exe hangs after grabbing the page - the delay works perfectly and the grab is successfull, but I have to use taskkill /IM webbrowser.exe /T /F to shut it down..?? Are you able to fix this?? My solution so far is to grab the image and then use another script to crop the image to the desired size... but as webbrowser.exe keeps hanging, I am currently using two different scripts - one to launch webbrowser.exe - another to run the taskkill and the crop - not really beautifull Thanks in advance /jan Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.