mhhhPizza Posted April 30, 2009 Share Posted April 30, 2009 Hello world perhaps you guys know how to deal with my problem. I need the coordinates of the upper left corner of a image displayed in my embedded IE. Is there any possibility to solve that? Thanks in advance for your efforts. One of those guys who like pizza Link to comment Share on other sites More sharing options...
herewasplato Posted April 30, 2009 Share Posted April 30, 2009 Welcome to the forum. Look in the help file under PixelSearch and/or PixelChecksum. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
mhhhPizza Posted April 30, 2009 Author Share Posted April 30, 2009 (edited) First, thanks for your answer. One problem is that the image´s upper left pixel is a black one (actually, the image´s edges are a black lines of 1px) and there is some text (which is black, too) before that image (Or imagine if the image´s upper left pixel is transparent, I don´t think pixelsearch would work then.). if I now try to look for the first black pixel, I get anything but the pixel I´m looking for The other problem is that I expect it to take a long time to search an area of about 600*600 px ... I hope there are other suggestions. Edited April 30, 2009 by mhhhPizza Link to comment Share on other sites More sharing options...
herewasplato Posted April 30, 2009 Share Posted April 30, 2009 Since a pic is worth 1k words - either write a whole bunch more or show a screen shot. :-) Guessing here: Anything unique inside the pic? If so, maybe you can locate that via PixelSearch and then search from there. And/or PixelChecksum can be shaped like a thin rectangle loop/sweep it across an area to find an edge that is not text. Slow/speed is relative. What is this for - a game? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Malkey Posted April 30, 2009 Share Posted April 30, 2009 Hello world perhaps you guys know how to deal with my problem. I need the coordinates of the upper left corner of a image displayed in my embedded IE. Is there any possibility to solve that? Thanks in advance for your efforts. One of those guys who like pizza I have no idea if this approach will work in an embedded IE. It works in the IE browser. (Modified help file example) ; ; ******************************************************* ; Example 2 - Create browser at AutoIt homepage, get Img collection ; and display src URL for each ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/") $oImgs = _IEImgGetCollection($oIE) $iNumImg = @extended MsgBox(0, "Img Info", "There are " & $iNumImg & " images on the page") For $oImg In $oImgs MsgBox(0, "Img Info", "src=" & $oImg.src & @CR & _ "FileName: " & $oImg.nameProp & @CR & _ "x-coordinate of the top left corner: " & _IEPropertyGet($oImg, "browserx") & @CR & _ "y-coordinate of the top left corner: " & _IEPropertyGet($oImg, "browsery") & @CR & _ "Width: " & $oImg.width & @CR & _ "Height: " & $oImg.height & @CR & _ "Border: " & $oImg.border) Next ;I hope this will help. Link to comment Share on other sites More sharing options...
DaleHohm Posted April 30, 2009 Share Posted April 30, 2009 _IEPropertyGet with browserX|browserY|screenX|screenY Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
was Posted April 30, 2009 Share Posted April 30, 2009 show how the pic looks like Link to comment Share on other sites More sharing options...
mhhhPizza Posted April 30, 2009 Author Share Posted April 30, 2009 Great! Works exactly the way I wanted it! Thank you very very much! 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