Arlen Posted December 12, 2017 Share Posted December 12, 2017 Hi, I am trying to make my router auto restart using IE.au3 but I am stuck, and I can't click the "Restart" Button. I have no idea what is wrong. ;First try Local $Reboot = _IEGetObjByName($oIE, "btnReboot") _IEAction($Reboot, "click") ;Second try Local $Reboot = _IEGetObjById($oIE, "btnReboot") _IEAction($Reboot, "click") ;Third try _IELinkClickByText($oIE, "Restart") I have included an image aswell. Link to comment Share on other sites More sharing options...
Juvigy Posted December 12, 2017 Share Posted December 12, 2017 Most likely you have frames. You will need to point to the correct frame using _IEFrameGetCollection and then do _IEGetObjById. You can also try to call the java function "Reboot()" directly. Search the forum for "Run Java" examples. Link to comment Share on other sites More sharing options...
Arlen Posted December 13, 2017 Author Share Posted December 13, 2017 (edited) 12 hours ago, Juvigy said: Most likely you have frames. You will need to point to the correct frame using _IEFrameGetCollection and then do _IEGetObjById. You can also try to call the java function "Reboot()" directly. Search the forum for "Run Java" examples. Do you have any example that can guide me? Been trying to do with "_IEFrameGetCollection" but no luck. I tried this but did not work. _IELoadWait($oIE) $oFound = "" $oBtns = _IETagNameGetCollection($oIE, "input") For $oBtn In $oBtns If String($oBtn.classname) = "submit" Then $oFound = $oBtn EndIf Next If IsObj($oFound) Then _IEAction ($oFound, "click") EndIf Edited December 13, 2017 by Arlen Link to comment Share on other sites More sharing options...
Arlen Posted December 16, 2017 Author Share Posted December 16, 2017 Bump =( Link to comment Share on other sites More sharing options...
Juvigy Posted December 18, 2017 Share Posted December 18, 2017 You can check this example: #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IE_Example("frameset") Local $oFrames = _IEFrameGetCollection($oIE) Local $iNumFrames = @extended Local $sTxt = $iNumFrames & " frames found" & @CRLF & @CRLF Local $oFrame = 0 For $i = 0 To ($iNumFrames - 1) $oFrame = _IEFrameGetCollection($oIE, $i) $sTxt &= _IEPropertyGet($oFrame, "innertext") & @CRLF Next MsgBox($MB_SYSTEMMODAL, "Frames Info", $sTxt) _IEQuit($oIE) Link to comment Share on other sites More sharing options...
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