Jump to content

Howto interact with forms in frames correctly?


Recommended Posts

Hi.

I found here a lot of Q's upon IE.AU3 and did read the help file topics upon _IE*() functions, but cannot figure out how to :)

The page this is about has just two frames. In the bottom frame there are several form areas. (see attached image)

What I want to do is to walk through the selection steps 1-5, then "click" (submit the form?) the button [download dateien] and to save with a modified name to a given path.

For step 3 I want to go through all the possible combinations (wich will be saved with unique names, of course)

This is what I've combined from the help file:

#include <ie.au3>
; POI-Updater
$url="http://www.gas-tankstellen.de/menu.php?jump=poi"

$oIE = _IECreate($url)

$oFrames=_IEFrameGetCollection ($oIE)
$iNumFrames = @extended
If $iNumFrames > 0 Then
    If _IEIsFrameSet ($oIE) Then
        MsgBox(0, "Frame Info", "Page contains " & $iNumFrames & " frames in a FrameSet")
    Else
        MsgBox(0, "Frame Info", "Page contains " & $iNumFrames & " iFrames")
    EndIf
    For $i = 0 to ($iNumFrames - 1)
    $oFrame = _IEFrameGetCollection ($oIE, $i)
    MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
Next

Else
    MsgBox(0, "Frame Info", "Page contains no frames")
EndIf

Howto get the names of the radio buttons / check boxes in Frame 2?

Howto submit the modified form?

Howto specify the file name the files shall be saved to?

I expect that this is some pretty basic IE.AU3 thing, well, I can't see howto ...

Regards, Rudi.

post-12537-1210598495_thumb.jpg

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

Why not just get the Frame 2 URL & manipulate that URL:

http://www.gas-tankstellen.de/poi.php?checksum=22e1a9746b

In firefox right click on the frame2->This frame->View Frame Info

Vuala

Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Why not just get the Frame 2 URL & manipulate that URL:

http://www.gas-tankstellen.de/poi.php?checksum=22e1a9746b

In firefox right click on the frame2->This frame->View Frame Info

:) My question is upon howto use IE.AU3 :( to do it. (or how does firefox help here to use IE.au3?)

Finally it shall run with the IE window invisible.

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

Suggest you try DebugBar (see my sig) to quickly learn about the element names and structure of your page.

Suggest you give that a try and come back with more questions.

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

Suggest you try DebugBar (see my sig) to quickly learn about the element names and structure of your page.

Suggest you give that a try and come back with more questions.

Dale

Great DLL!!! :) respect!

How do I know from debug bar's output what to do using IE.AU3?

Regards, Rudi.

post-12537-1210632124_thumb.jpg

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

YOu are in the 2nd Frame... it has a name... use

$oFrame = _IEFrameGetObjByName($oIE, "the-name")

There is a form that has a name form1

$oForm = _IEFormGetObjByName($oFrame, "form1")

Then use _IEFormElementRadioSelect

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

YOu are in the 2nd Frame...

Yes, I've seen that.

it has a name... use

$oFrame = _IEFrameGetObjByName($oIE, "the-name")

Hm. All I see is "Frame" for both, frame1 and frame2?

There is a form that has a name form1

Yes, that I've seen again...

$oForm = _IEFormGetObjByName($oFrame, "form1")

Then use _IEFormElementRadioSelect

I'm quite far away to "think of IE as an API" :) ...

Thanks, regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

So if you click on the 2nd frame in the tree view of DebugBar it will show you the source for it including the name= -- I didn't give the the exact command for getting the frame reference because I cannot see it in the screen shot you left (it could well be called frame2, but you'll need to check). You should be able to use the $oForm line just as is as soon as you have hte $oFrame reference.

Then see the helpfile for examples of using _IEFormElementRadioSelect (note that the radio name=gas).

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...