Jump to content
Sign in to follow this  
rageagainstthepc

Help with IE control

Recommended Posts

rageagainstthepc

Hi,

I am a newbie to AutoIt v3. I am trying to initialize a webpage using _IECreate and then click a link which should

bring up a download dialog for saving the downloaded file to a mapped drive (I am using Win XP Professional).

My script brings up a browser for the URL used with _IECreate, but the click on the link does not happen. Any help

about how to proceed with further steps will be appreciated.

* * *

#include <IE.au3>

$oIE = _IECreate ("http://www.mcafee.com/apps/downloads/security_updates/dat.asp?region=us&segment=enterprise")

Sleep(2000)

$o_download = _IEGetObjByName($oIE,"dat-5490.zip")

_IEAction($o_download,"click")

* * *

Mr R

Share this post


Link to post
Share on other sites
iHonda

you dont need to open ie and all that heres a good way to to it:

INetGet("http://download.nai.com/products/datfiles/4.x/nai/dat-5490.zip", @DesktopDir & "/dat-5490.zip")

this will download the file you wanted to download to the desktop and name the downloaded file dat-5490.zip You can change @DesktopDir & "/dat-5490.zip" to anything you want

@volly hes tryin to download an update from McAfee

peace,

Z

Edited by Zmaster

A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites
rageagainstthepc

you dont need to open ie and all that heres a good way to to it:

INetGet("http://download.nai.com/products/datfiles/4.x/nai/dat-5490.zip", @DesktopDir & "/dat-5490.zip")

this will download the file you wanted to download to the desktop and name the downloaded file dat-5490.zip You can change @DesktopDir & "/dat-5490.zip" to anything you want

@volly hes tryin to download an update from McAfee

peace,

Z

Zmaster,

Thank you very much. Is there a way to have the number which is part of the zip file as a variable?

Also, does _IEGetobjByName work for any control on a webpage? Sorry these may be elementary questions

but my experience with AutoIt is very limited.

Mr R

Share this post


Link to post
Share on other sites
DaleHohm

Zmaster,

Thank you very much. Is there a way to have the number which is part of the zip file as a variable?

Also, does _IEGetobjByName work for any control on a webpage? Sorry these may be elementary questions

but my experience with AutoIt is very limited.

Mr R

_IEGetobjByName gets elements on a page whose HTML includes NAME=xxx (_IEGetobjByName will also find an element with ID=xxx).

Look at the page source -- suggest using DebugBar (see my sig).

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

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  

×