_IECreateEmbedded different from regular IE in Win 7?

Recommended Posts

Alodar 0

Alodar 0

So I have a script that I wrote that opens a php page that has an input type box, a 'browse' button for the box, and a submit button. The 'browse' button does not appear if I am viewing the web page in the full version of IE, only the embedded one. This is not true on WinXP, only on Win7 (idk about Vista, skipped that).

On WinXP, opening the page, using _IEAction(<Control>, "focus") and then Send("Text") works, and I can submit the form using _IEFormSubmit.

However, on Win 7, using _IECreateEmbedded brings up a different kind of IE it seems? The same actions instead bring up a dialog box like I had clicked on the 'browse' button; _IEAction gives me an error at the _IEisObjType line.

I can still click on it manually and type, but it's greyed out a little, unlike if I open it up from IE on the desktop.

I tried to set compatibility mode in the settings, but it appears to make no difference. Working with the new AutoIt Beta version didn't seem to make a difference either.

I can't use IECreate2 as referenced elsewhere as it prevents you from using the username/password in the URL if you do, whereas IECreateEmbedded allows it. (yes, bad practice I know, but it's internal for an internal site).

I also can't use the alternate method of clicking on the button with the mouse as the pop up box halts the script in entirety.

Share this post

Link to post

Share on other sites

Alodar 0

Alodar 0

I found a workaround, for anyone interested. Even though it brings up a file choose dialog, the event from 'Send' is still active, and responds (albeit a tad slowly). Using send with a large amount of spaces in front works out in the end, as a trim of some sort is applied before the item.

So, choosing the input box to get focus and then using send still works (as shown below).

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=YDoesn'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

Similar Content

Wrote a script that grabs all of the IP addresses from Netflix's IP log, checks the IPs and returns suspicious activity.
Everything works as it should but only when _IECreate is set to visible. When visible is set to false, it fails to login for some reason.
Any ideas what might cause it and/or how to circumvent that?

Hello,
If anyone can help, it would be greatly appreciated. The code is just an example and similar to the issue with an internal webpage. I'm trying to autofill than click the submit button. I get the same error running the script.
_IEFormElementSetValue, $_IESTATUS_InvalidObjectType
IEGetObjById, $_IESTATUS_NoMatch
Is it possible to edit the <textarea></textarea> field with AutoIt? If anyone could assist me on how. Than I could have a better understanding and chance in figuring it out on my main script. Thank you
#include <IE.au3>
Local $oIE1 = _IECreate ("https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea")
_IELoadWait($oIE1)
local $oFormCollection = _IEFormGetCollection($oIE1,0)
local $oid = _IEGetObjByid($oFormCollection, "iframeResult")
_IEFormElementSetValue($oid, "test")
sleep (2000)
Local $oIE2 = _IECreate ("https://www.w3schools.com/html/tryit.asp?filename=tryhtml_scripts_intro")
_IELoadWait($oIE2)
$oForm2 = _IEFormGetCollection($oIE2,0)
$oClickMe = _IEGetObjById($oForm2, "demo")
_IEAction($oClickMe, "focus")
_IEAction($oClickMe, "click")

Hey Guys,
Hope that you can help me with something, maybe this is a bug in the new version of AUTOIT but first i will check it with you to know for sure.
I have made a simple GUI with a Embedded IE Object, then i would like to read the HTML with _IEBodyReadHTML(), easy right?
When i use the old IE.au3 include from a year back or so, it is working fine!
When i use the new IE.au3 include came with the new installation that is currently available on autoitscript.com it isnt working (i get a result that says; 0).
Let me show you.