Sign in to follow this  
Followers 0
diikee

_IEAction

14 posts in this topic

I am automating a web button with no text but the id=down_button in source code below.

How do I get this done??

<TR><TD id="zoomin_button" align="left"><A onmouseup="return stopPanDown();" class="down" onmousedown="return startPanDown();" onmouseover="window.status='move down'; return true;" onclick="return false" onmouseout="window.status=''; stopThreads()" href=" ">&nbsp;</A></TD></TR>

$obut = _IEGetObjById ($oIE, "zoomin_button")

_IEAction ($obut, "click")

_IELoadWait($oIE)

in the browser, I don't see any change but the script runs and compiles okay.

what am I missing :D

Share this post


Link to post
Share on other sites



It is apperciated of you to make your topic titles descriptive, and without upper-case letters.

As for your problem, try checking out some more useful _IE* functions instead of GetObjById.

Share this post


Link to post
Share on other sites

Do you have an _IEAttach in your script to initialize the $oIE?

Below a short example for google

#include <IE.au3>
$oIE = _IECreate ("www.google.com")
$searchQ = _IEGetObjById ($oIE, "q")
$oSubmit = _IEGetObjById ($oIE, "btnG")

_IEFormElementSetValue($searchq,"Autoit")

$oclick =  _IEAction ($oSubmit, "click")

Share this post


Link to post
Share on other sites

You're needing less common events than are typically used, so IE.au3 doesn't directly support them.

You should still be able to get what you wnt however with direct DOM interaction:

$obut = _IEGetObjById ($oIE, "zoomin_button")
$obut.fireEvent("onmouseover")
$obut.fireEvent("onmousedown")
$obut.fireEvent("onmouseoout")

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

below is my script, advice what I need to add....

#include <IE.au3>

$ip = InputBox("Get Ip Address", "Enter IP Address: ")

$oIE = _IECreate($ip, 0)

_IENavigate($oIE, $ip)

_IELoadWait($oIE)

_IELinkClickByText($oIE, "p1")

_IELoadWait($oIE)

_IELinkClickByText($oIE, "p2")

_IELoadWait($oIE)

_IELinkClickByText($oIE, "p3")

_IELoadWait($oIE)

$obut = _IEGetObjByID($oIE, "zoomin_button")

_IEAction($obut, "click")

_IELoadWait($oIE)

Share this post


Link to post
Share on other sites

I assume you missed my reply?


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

Tried the

$obut.fireEvent("onmousedown")

and no events noticed on the browser

it's supposed to zoom in on an object but nothing happens

Share this post


Link to post
Share on other sites

It may be happening too fast.

$obut = _IEGetObjById ($oIE, "zoomin_button")
$obut.fireEvent("onmouseover")
Sleep(1000)
$obut.fireEvent("onmousedown")
Sleep(5000)
$obut.fireEvent("onmouseup")
Sleep(1000)
$obut.fireEvent("onmouseoout")

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

<BODY><FORM name="myform" action=""><TABLE class="main" cellSpacing="0" cellPadding="0" width="820"><TBODY><TR><TD vAlign="top" align="left" colSpan="2"><TABLE class="content" id="controls" cellSpacing="0" cellPadding="0"><TBODY><TR vAlign="top"><TD><TABLE class="menu" style="MARGIN-TOP: 11px"><TBODY><TR><TD id="save_button" style="PADDING-BOTTOM: 2px"><UL id="buttonh"><LI class="menu">

<A class="menu" onmouseover='window.status="save image to a file"; return true;' style="PADDING-RIGHT: 10px; PADDING-LEFT: 5px" onclick="return saveAs();" onmouseout='window.status="";' href="">SNAPSHOT</A>

here is another one--supposed to invoke the windows "save as" prompt but nothing

$osv = _IEGetObjById($oIE, "save_button")

$osv.fireEvent("onclick")

Sleep(2000)

Share this post


Link to post
Share on other sites

In theory, these techniques should work. Without access to the site, the script behind the events and the ability to test however there is little more I can do.

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

Is it possible to getObjByClass(menu)???

I believe this is what invokes the javascript to initiate the onclick/onmouseover/onmouseout

thanks,

Dickson

Share this post


Link to post
Share on other sites

Is it possible to getObjByClass(menu)???

I believe this is what invokes the javascript to initiate the onclick/onmouseover/onmouseout

thanks,

Dickson

The class= relates to an object property of .className

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

Dale,

have you ever encountered such a scenario where I you can't access or control objects within a page or is it just something that I am missing??

do you have something that invokes windows "save as prompt"?? Maybe it will lead me to something

Share this post


Link to post
Share on other sites

The examples I gave do access the elements, but the kind of access required and the behavior of the page depends on the script behind the events. To go further you must either get it by guessing and trial and error or you must tear into the script and understand what it is doing.

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  
Followers 0