ahha Posted January 26, 2020 Posted January 26, 2020 Using IE V11.592.18362.0 and IE document.parentWindow.pageYOffset fails. Searched and found mLipok's script and ran it and still looks like broken. Has anyone found a fix/workaround for getting pageYOffset?
Nine Posted January 26, 2020 Posted January 26, 2020 That should work, but for strange reason, it had worked in the past, but not now : #include <IE.au3> Local $sHTML = '<HTML><Head><script language="javascript" type="text/javascript">' $sHTML &= "var total = window.pageYOffset;" & @CRLF $sHTML &= "alert (xEval());" & @CRLF $sHTML &= "function xEval () {return total;}" $sHTML &= "</script></Head></HTML>" Local $oIE = _IECreate("about:blank") _IEDocWriteHTML($oIE, $sHTML) _IEAction($oIE, "refresh") Local $Total = $oIE.document.xEval() MsgBox (0,"",$Total) idk, what is the problem. I cannot have access to any created vars or functions. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy
ahha Posted January 27, 2020 Author Posted January 27, 2020 Thanks - I guess I'm stuck. Maybe it's time for me to look at FireFox - do you happen to know if there is an equivalent window.pageYOffset that works?
Nine Posted January 27, 2020 Posted January 27, 2020 (edited) I was able to make it work with embedded IE like this : #include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> #include <Process.au3> Local $regValue = "0x2AF8" RegWrite("HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) Local $oIE = _IECreateEmbedded () GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUISetState(@SW_SHOW) _IENavigate ($oIE, "http://www.geom.uiuc.edu/~huberty/math5337/groupe/digits.html") $oIE.document.parentWindow.scrollBy(0, 200) Local $iYOff = $oIE.document.parentwindow.pageYOffset MsgBox ($MB_SYSTEMMODAL,"",$iYOff) While 1 Switch GUIGetMsg () Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd But I am still not able to make it work with "InternetExplorer.Application" object. Edited January 27, 2020 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy
ahha Posted January 28, 2020 Author Posted January 28, 2020 Wow - thanks. I'll try it. I'm not familiar with embedded IE. Time to learn.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now