Jump to content

after updating explorer 11 command "$oIE.document.parentWindow.execScript("setTimeout(function(){document.f2.submit()},1)")" stopped working


shura
 Share

Recommended Posts

after updating explorer 11 command "$oIE.document.parentWindow.execScript("setTimeout(function(){document.f2.submit()},1)")" stopped working

code 

#include <IE.au3>
#include <TrayConstants.au3>
#include <MsgBoxConstants.au3>

If Not $CmdLine[0] Then
    MsgBox(16, '', 'No ID of working or no Password ')
    Exit
 EndIf

$sLogin = $CmdLine[1]
$sPassw = $CmdLine[2]

Local $sUrl = 'https://kla.moovex.net/mobile/login.asp'

$oIE = _IECreate( $sUrl,0,0,0)
$HWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($HWND, "", @SW_MAXIMIZE  )
 _IELoadWait($oIE)

$oForm = _IEFormGetObjByName($oIE, "f2")
$oLogin = _IEFormElementGetObjByName($oForm, "email")
$oPassw = _IEFormElementGetObjByName($oForm, "pass")
_IEFormElementSetValue($oLogin, $sLogin)
_IEFormElementSetValue($oPassw, $sPassw)
Sleep(2000)
 $oIE.document.parentWindow.execScript("setTimeout(function(){document.f2.submit()},1)")
$oIE.document.parentWindow.execScript("setTimeout(function(){document.f2.submit()},1)") ; command for pressing

What can be done?

Link to comment
Share on other sites

  • Moderators

IE11 no longer uses execScript.

https://msdn.microsoft.com/en-us/library/ie/ms536420%28v=vs.85%29.aspx

First line and what to do.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

 $oIE.document.parentWindow.Eval("setTimeout(function(){document.f2.submit()})")

-the coomand below not working 

where is my error

 

code of page 

<!DOCTYPE html><html><head><meta http-equiv=X-UA-Compatible content=IE=edge><title>Moovex - מערכת לניהול היסעים בארגון</title><meta http-equiv=Content-Type content=text/html; charset=windows-1255><meta http-equiv=Content-Language content=he><META name=Language content=he><META name=distribution content=Global><link href=images/style.css rel=stylesheet type=text/css></head><body><table width=100% border=0 cellpadding=5 cellspacing=5 dir=ltr><tr><td height=30 bgcolor=#000000></td></tr><tr><td height=110 bgcolor=#EEEEEE><a href=default.asp><img src=images/moovex.png width=300 height=97 hspace=20 border=0></a>V. 14.12.29</td></tr></table><div class=login_page></div><table border=0 cellspacing=0 cellpadding=0 align=center dir=rtl><form action=?action=login id=f2 method=post name=f2><tr><td valign=top><table width=100% border=0 cellspacing=10 cellpadding=10><tr><td><input type=text name=email id=email value="שם משתמש" onfocus=this.value=''; class=login_textbox></td></tr><tr><td><input type=password name=pass id=pass value="סיסמה" onfocus=this.value=''; class=login_textbox></td></tr><input type=hidden name=screenW id=screenW value=screenW><input type=hidden name=screenH id=screenH value=screenH><tr><td align=right><input type=submit name=login id=login value=כניסה class=submit_register onclick='ScreenDetect();'></td></tr></table></td><td valign=top><img src=images/login.jpg height=350></td></tr></form></table><script> screenW = screen.width;  screenH = screen.height;  document.getElementById('screenH').value = screenH; document.getElementById('screenW').value = screenW; </script><div align=center><br><hr><div dir=ltr><span class=rrbottom>Powered by  <a href=http://axisis.net>Axis I.S. Ltd.</a> | Copyright (c) 2014 | <a target=top href=http://axisis.net/terms.asp>Terms of use</a></span></div><br><br><br><br></body></html>
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...