Jump to content
Sign in to follow this  
darzanmihai

Need help--IE.au3

Recommended Posts

darzanmihai

How could I use the IE.au3 for the followings:

enter the site: http://www.opcom.ro/portal/content.aspx?la...O&item=2132

select the date--> select the button "View Report"---> select "Excel" in the combo that is initialy set to "Select a format" and then -->> click on "Export" for downloading the file?

I have never used the IE UDF and I have never worked with objects....

Could anyone help me on this matter with a code example and some guidence to help me understand.

Thx in advance!


I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Share this post


Link to post
Share on other sites
darzanmihai

At least please someone guide me how could I identify the IDs of the buttons I must push!


I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Share this post


Link to post
Share on other sites
DaleHohm

There are lots of code example in the helpfile for IE.au3. Each of them is a full, stand-alone, working example so run them, don't just read them.

For finding the object information on a page, I recommend DebugBar (see my sig).

Dale

Edited by DaleHohm

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
darzanmihai

There are lots of code example in the helpfile for IE.au3. Each of them is a full, stand-alone, working example so run them, don't just read them.

For finding the object information on a page, I recommend DebugBar (see my sig).

Dale

Thx for the toolbar...it is great, but I still have 2 questions:

How could I simulate a mouse click on a button, if I know the buttons ID?--->for this one I tried _IEFormSubmit () but it does not do the job

How could I select a data from a combo box?--->for this I tried _IEFormElementSetValue (), but also it does not do the job for a combobox(it worked for the inputbox)

I only need some suggestions.

Thank you for your your reply...the DebugBar really helped me.


I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Share this post


Link to post
Share on other sites
gooker

:)

$date = "2008/9/1"

$oIE = _IECreate("http://reporting.opcom.ro/ReportServer/Pages/ReportViewer.aspx?%2fMCPweb%2fReport_MCP_simple_ro&rs:Command=Render")

$oInput = _IEGetObjByName($oIE,"ReportViewerControl$ctl00$ctl03$ctl00")

If @error =0 Then

$oInput.value = $date

EndIf

$oButton= _IEGetObjByName($oIE,"ReportViewerControl_ctl00_ctl00")

If @error =0 Then

$oButton.click

EndIf

_IELoadWait($oIE)

$oSelect = _IEGetObjByName($oIE,"ReportViewerControl_ctl01_ctl05_ctl00")

If @error =0 Then

_IEFormElementOptionselect ($oSelect, 6, 1, "byIndex")

Sleep(1000)

EndIf

$oLink = _IEGetObjByName($oIE,"ReportViewerControl_ctl01_ctl05_ctl01")

If @error =0 Then

$oLink.click

EndIf


Share this post


Link to post
Share on other sites
DaleHohm

Thx for the toolbar...it is great, but I still have 2 questions:

How could I simulate a mouse click on a button, if I know the buttons ID?--->for this one I tried _IEFormSubmit () but it does not do the job

How could I select a data from a combo box?--->for this I tried _IEFormElementSetValue (), but also it does not do the job for a combobox(it worked for the inputbox)

I only need some suggestions.

Thank you for your your reply...the DebugBar really helped me.

Read the Remarks for _IEFormSubmit in the helpfile and user _IEAction as suggested instead.

As gooker points out, _IEFormElementOptionselect can be used to both get and set option values in a SELECT elemment (what you are calling a combobox).

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
DaleHohm

Thx for the toolbar...it is great, but I still have 2 questions:

How could I simulate a mouse click on a button, if I know the buttons ID?--->for this one I tried _IEFormSubmit () but it does not do the job

How could I select a data from a combo box?--->for this I tried _IEFormElementSetValue (), but also it does not do the job for a combobox(it worked for the inputbox)

I only need some suggestions.

Thank you for your your reply...the DebugBar really helped me.

Read the Remarks for _IEFormSubmit in the helpfile and use _IEAction as suggested instead.

As gooker points out, _IEFormElementOptionselect can be used to both get and set option values in a SELECT elemment (what you are calling a combobox).

Dale

Edit: typo

Edited by DaleHohm

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

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  

×