Shoutbox

[?] Finding Images in InternetExplorer Object - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [?] Finding Images in InternetExplorer Object (/showthread.php?tid=85914)

[?] Finding Images in InternetExplorer Object by Spunky on 09-12-2008 at 11:39 PM

I'm trying to detect when the mouse is clicked over an image; I can already detect clicks, but not really what is underneath the mouse. Anybody have any idea? Google isn't really very helpful with anything related to the IE Object


RE: [?] Finding Images in InternetExplorer Object by felipEx on 09-13-2008 at 02:52 AM

Well, I've managed to do it a long time ago

code:
function callback(Browser){
    function Browser::DocumentComplete()
    {   
        Browser.Document.getElementById("your_picture_id").onclick = new Function("MsgPlus.DisplayToast('', ';o');" )
    }
}
var Wnd = MsgPlus.CreateWnd("windows.xml", "browserwnd");
var MyBrowser = Wnd.Browser_GetInterface("MyBrowserControl");

callback(MyBrowser);
MyBrowser.navigate("c:\\test.html");  // just for testing
just don't look at Google, have a look at MSDN :)
RE: [?] Finding Images in InternetExplorer Object by Spunky on 09-13-2008 at 02:58 AM

I do usually look at msdn, but the search is sometimes dodgy, so I find the exact page on Google.

Anyway, I need to call a certain function when ANY picture is right-clicked, but I'm sure I'll get it from that (Y)



Yay, thanks :p I had to use onmouse enter and leave events to change a variable to tell me if the mouse was over an image or not, but it works nicely :p



RE: [?] Finding Images in InternetExplorer Object by Jarrod on 09-13-2008 at 04:17 AM

sounds interesting, wats it 4?


RE: [?] Finding Images in InternetExplorer Object by Spunky on 09-13-2008 at 04:37 AM

It's a little project I'm working on :p

[Image: attachment.php?pid=926863]


RE: [?] Finding Images in InternetExplorer Object by Felu on 09-13-2008 at 06:31 AM

lol a Plus! Browser, eh?


RE: [?] Finding Images in InternetExplorer Object by NanaFreak on 09-13-2008 at 06:47 AM

seems kinda pointless... becuase it uses IE not FF/chrome =\


RE: [?] Finding Images in InternetExplorer Object by SmokingCookie on 09-13-2008 at 07:11 AM

Getting a picture from an HTML file isn't so difficult:

Load the file in a DOM object, select all nodes with the name "Img", and read their attributes you want to access.


RE: [?] Finding Images in InternetExplorer Object by Matti on 09-13-2008 at 07:55 AM

quote:
Originally posted by SmokingCookie
Getting a picture from an HTML file isn't so difficult:

Load the file in a DOM object, select all nodes with the name "Img", and read their attributes you want to access.
Actually, he wants to detect when the mouse moves above an image. :P (see first post and replies)

I didn't know you could do that much with the InternetExplorer interface, this is really interesting! :)
RE: [?] Finding Images in InternetExplorer Object by SmokingCookie on 09-13-2008 at 08:13 AM

If I'd want to retrieve the image file, I'd have to select the node Img, with some identification stuff, and then retrieve the Src attribute..