Jump to content

And again _IE.au3 problems: Hidden source.


Recommended Posts

Hello.

I have encountered more problems with using _IE.au3 :)

Lets say theres some website, $random.com

It has hidden frames, I think thats how there called. Basically, it stores all the valuable source (buttons, links, options) at $random.com/hiddenframes.php, Is it possible to read the source from there, but force the script to evaluate clicks, etc. on $random.com ?

My script works when I'm at hiddenframes.php, the problem is all the javascripts are evaluated on the main page, so using my script on hiddenframes.php causes bugs and glitches.

This is some of the source on the main page, that could make it clearer:

<form name="someform" method="POST" action="/hiddenframes.php">

window.location = 'hiddenframes.php';

And theres more for all the buttons and options etc.

There is however another problem, this is a bit less complex.

I need to use _IEAction ($oSubmit, "click") to click a button, however the button is javascripted to only respond when a real click occurs (All the other buttons are clicked just fine by using _IEAction ($oSubmit, "click"))

So I have tried to use:

$oSubmit = _IEGetObjByName ($oIE, "submitExample")
$hwnd = _IEPropertyGet($oIE, "hwnd")
_IEAction ($oSubmit, "focus")
ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}")

The button gets highlited, but enter doesn't work with it (I have tried manually)

So, I have changed ControlSend to ControlClick and it works. The problem is, I need to manually set the buttons coordinates for it to be clicked, is it possible to retrieve the coordinates from the source / handle ? (The button is on a website so Au3info tool won't help here)

Thanks in advance

Link to comment
Share on other sites

See _IEFrameGetObjByName

If the button pays attention to other events besides the onclick event, you may have to do somethinglike the following:

$oSubmit.fireEvent("onmousedown")
_IEAction($oSubmit, "click")

You'll need to study the Javascript to know what events are required.

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

See _IEFrameGetObjByName

If the button pays attention to other events besides the onclick event, you may have to do somethinglike the following:

$oSubmit.fireEvent("onmousedown")
_IEAction($oSubmit, "click")

You'll need to study the Javascript to know what events are required.

Dale

Thanks Dale! You truly are the IE Master :)
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...