Jump to content
Sign in to follow this  

_IECreateEmbedded different from regular IE in Win 7?

Recommended Posts

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.

Edited by Alodar

Share this post

Link to post
Share on other sites

So far I can't find a workaround. Looks like this is going to have to go under Win7 broken changes; will have to automate a way around it somehow.

Share this post

Link to post
Share on other sites

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).

GUICreate("Load Tool", 660, 500, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, $DS_MODALFRAME + $WS_CAPTION + $WS_SYSMENU + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 10, 640, 480)
_IENavigate($oIE, "<Redacted for work reasons>")
$oForm = _IEFormGetCollection($oIE, 0)
$FileChoice = _IEGetObjByName($oIE, "uploaded")
_IEAction($FileChoice, "focus")
  Send("                                                                                                                          " & $FileName & "{ENTER}")
Edited by Alodar

Share this post

Link to post
Share on other sites

Suggest you upgrade to the latest AutoIt beta for related fixes.


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  

  • Similar Content

    • By moimon
      Hi all. 
      Sorry if my words are confusing because I am not good at English.
      I am writing code to embed website with Recaptcha in GUI. And then, the code will automatically press the "I'm not a robot" button. The problem here is:
         - The code still works fine when entering iFrame to interact with Recaptcha with the URL is "https://www.google.com/recaptcha/api2/demo"
         - But for other URLs (such as "https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php"), the code cannot be entered into the iframe.
      I did a lot of research but didn't know why.
       I sincerely thanks for the help. 
    • By SkysLastChance
      I am pretty sure the site that I am using was updated and now I am not seeing the same tags/elements that I used to. I tried using a UIAspy to see if I could grab them that way with no luck. 
      What do I need to do to be able to automate this again. Are the elements hidden somewhere?
      Instead of highlighting established account is highlights all of the web page almost. How can I get to the detail again? 
      I used to grab establish account by the name. Now I have nothing to even try to grab. 
      There are not elements in the event viewer either. 

      This is what happens when I try to inspect the element and click established account. 
      I get the same type of results in chrome
    • By yffulf
      Is there probably a way to click ie popup button and hide or invisible popup button in the same time?
      I try to use WinSetState @SW_hide ,
      the result is ie crashing or no response because button hide and the next click command won't work...
      $oForm=_IEFormGetObjByName($oIE,"form1") $obutton=_IEFormElementGetObjByName($oForm,"btn_OK") $hWnd = _IEPropertyGet($oIE, "hwnd") _IEAction($obutton,"focus") ControlSend($hWnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") WinWait("", "確定存檔嗎?") WinSetState("","確定存檔嗎?",@SW_Hide) ControlClick("", "確定存檔嗎?", "[CLASS:Button; TEXT:確定; Instance:1;]")  
    • By _leo_
      Hey there!
      I am having a problem with clicking a button in IE. As you can see in the code, there would be a class name to click it, but since this button exists several times with exactly the same code, I can only use the "Noch nicht veröffentlicht" to separate it from the others. But this part is just pure text without any classification. 
      "<div class="checkmark" data-v-1e5b1f70=""><svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 16 16" data-v-1e5b1f70=""><circle cx="8" cy="8" r="8" data-v-1e5b1f70="" /></svg></div>Noch nicht veröffentlicht"
      I was trying to click it with:
      #include <IE.au3> local $oNNVs = _IEFormGetCollection($oIE2) For $oNNV in $oNNVs If String($oNNV.innertext) = "Noch nicht veröffentlicht" Then _IEAction($oNNV, "click") EndIf Next and:
      $inputs = $oIE2.document.getElementsByTagName("div") For $input In $inputs If $input.innertext == "Noch nicht veröffentlicht" then $input.click() EndIf Next But nothing seems to work. Thanks for the help!
    • By lonardd
      I have a very strange problem concerning MouseClick function.
      I need to start Control Panel, navigate it on the Display Section (Adjust screen resolution link), click on it, and from the next Dialog choose Intel Graphic tool tab and navigate into it when it opens. 
      I wasn't using MouseClick() at first when I tried to use Control IDs, but I was fed up with the Autoit Window Info poor and inaccurate info (It flickers and the moment I click on the control the control ID and class disappear) so I ended up choosing the easiest way.
      The code I'm posting worked OK until two weeks ago, the mouse clicks were accurately performed and the Script reached the end with no errors...and I was happy.
      All of a sudden, between one try and the other, I noticed the cursor not flying exactly where it was supposed to, namely to the Control Panel ->Display->Adjust screen resolution link   but it clicked some 30 pixels below and some 30 pixels to the left, choosing obviously and undesired function and from that point it screwed the whole thing up. And from that moment onward, it seems I can no longer regain the mouse to click on that sequence.
      Could it be because my Control Panel ->Display form moved slightly from one test to another and therefore I got that small offside?
      If you believe this is the reason, I should then re position the Control Panel ->Display window to 0,0 and recalculate all the clicks. 
      do you have a suggestion?
      Thanks a lot
  • Create New...