Jump to content
Sign in to follow this  
wisem2540

Trying to click buttons in IE. Where do object names come from?

Recommended Posts

wisem2540

#include <IE.au3>
Local $oIE = _IE_Example("form")
Local $oForm = _IEGetObjByName($oIE, "ExampleForm")
sleep(5000)
$oSubmit = _IEGetObjByName($oIE, "submitexample")
_IEAction($oSubmit, "click")

so this example seems to work. But where does the name "Submitexample" come from? How can I find the names of other buttons?

Edited by wisem2540

Share this post


Link to post
Share on other sites
DaleHohm

Really? Look at the webpage created by $oIE = _IE_Example("form") - I put the HTML source for the form elements right on the page... llok around.

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
wisem2540

Maybe my initial question was unclear. What I meant to ask was....

How can I find the button info of buttons on OTHER webpages. What I am trying to do is automate webclicks on an unrelated page. I apologize for being unclear, but I still believe the sarcasm was not needed...

thanks

Share this post


Link to post
Share on other sites
JLogan3o13

Right-click on any page, view source, do a lot of reading.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
wisem2540

I tried that. There is no option to right click on this page. Also, when I use Autoit Window Info, it treats the whole page as one "control" (does that make sense?) So there is no way to get the info of each button. Is there a way around this?

Share this post


Link to post
Share on other sites
DaleHohm

Try not to waste our time with poorly worded questions and you'll probably avoid what you called sarcasm.

There are many DOM inspectors available - I suggest 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
wisem2540

Awesome, I was able to use the "Spy" option in the debugger to find the source code. So i thought I would try something simple like clicking the OK button. According to the source, the object name is "btnok"

So i tried a controlclick command, but that didnt seem to do it. Will that not work with IE?

thanks

Share this post


Link to post
Share on other sites
wisem2540

Im sorry. I am really having trouble grasping this. It appears I keep getting NO MATCH for thr form name. I have automated several things with autoit, but never anything with IE. I apologize for the ignroance

Edited by wisem2540

Share this post


Link to post
Share on other sites
JLogan3o13

How about a sample URL that you're trying to manipulate? Otherwise we're just shooting in the dark.


√-1 2^3 ∑ π, and it was delicious!

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  

×