Jump to content
Sign in to follow this  
testingtest

IE Property

Recommended Posts

testingtest

ok since my old thread died after a few people helped I have decided to make a fresh post.

This project means a lot to me I really haven't posted anything decent in the past.

Ill even add two pictures as a example.

Posted Image

ok so here we have a image that some of you may know. while if you right click that image this will pop up

Posted Image

see the were it is highlighted I need that info to rescale my gui but while it is getting that info I don't want it to be visable or interfare

Share this post


Link to post
Share on other sites
mikehunt114

What does this have to do with IE? Please explain thoroughly, and post a reproducer of your problem or at the very least, an example of what you are trying to accomplish.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites
Bert

I think I understand what it has to do with IE. You want to get the size of the pic in the HTML file. AM I right? You may be able to get the name of the file, then read the HTML to look for it. Once found, read the sizing on the pic. It may be difficult for depending on how the code is done, position of what you need may change along with things that help you point to what you need.

Share this post


Link to post
Share on other sites
DaleHohm

This will show you thte width and height and src of the image in the rendered page... does it help?

$oImgs = _IEImgGetCollection($oIE)
For $oImg in $oImgs
    ConsoleWrite($oImg.height & " : " & $oImg.width  & " : " & $oImg.src & @CR)
Next

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

Share this post


Link to post
Share on other sites
mikehunt114

Ah, you are getting your picture from IE. To expand on other's advice:

#include <IE.au3>
#include <GUIConstants.au3>
Opt("GUIOnEventMode", True)

$url = "http://www.autoitscript.com/forum/index.php?showtopic=51816"
$oIE = _IECreate($url, 1)

$oImgs = _IEImgGetCollection($oIE)
For $oImg In $oImgs
    $imgURL = $oImg.src
    If $imgURL = "http://img184.imageshack.us/img184/6444/example1iw8.th.png" Then
        $imgFileName = $oImg.nameProp
        $imgHeight = $oImg.Height
        $imgWidth = $oImg.Width
        InetGet($imgURL, @TempDir & $imgFileName)
        GUICreate("GUI Sized to Picture Example", $imgWidth, $imgHeight)
        GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")
        GUICtrlCreatePic(@TempDir & $imgFileName, 0, 0)
        GUISetState()
    EndIf
Next

While 1
    Sleep(10)
WEnd

Func Terminate()
    Exit 0
EndFunc

Grabs your first pic and creates a GUI around it.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites
testingtest

Thanks guys looks like what I need

Edited by testingtest

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×