Terenz Posted September 18, 2014 Share Posted September 18, 2014 Hello. I need to "automize" an intranet website, some task nothing too difficult but seems i can't. I need to: 1) Write on an inputbox 2) Click on a button 3) Get text from an editbox I'm stuck with the first The main problem is i can't get any form ( using example from the help at _IEFormGetCollection in For...Loop ) but at least i know the name of the input: <input name="TxTInput" type="text" id="TxTInput" style="font-size:Smaller;width:60px;"> What i need to do? Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
j0kky Posted September 18, 2014 Share Posted September 18, 2014 (edited) _IEGetObjById _IEPropertySet ;"innertext" value for property paramenter should work These should work for you P.S: why can't you get any form? Edited September 18, 2014 by j0kky Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
Terenz Posted September 18, 2014 Author Share Posted September 18, 2014 (edited) Nope #include <IE.au3> $oIE = _IECreate("mysite") Local $oDiv = _IEGetObjById($oIE, "TxTInput") ConsoleWrite($oDiv & @CRLF) _IEPropertySet($oDiv, "innertext", "Look What I can Do") _IEGetObjById return zero. Seems the input is inside a table: table id="TableMain" cellspacing="0" cellpadding="6" border="0" style="border-color:#FFCC00;border-width:1px;border-style:solid;width:430px;border-collapse:collapse;"> Does matter? P.S: why can't you get any form? I don't have any idea, the function _IEFormGetCollection rertun the message There are 0 form(s) on this page Edited September 18, 2014 by Terenz Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
jdelaney Posted September 18, 2014 Share Posted September 18, 2014 Is your control in a Frame or iFrame? Do a forum search if it is. This was answered pleanty of times. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Terenz Posted September 18, 2014 Author Share Posted September 18, 2014 (edited) How i can know if is a Frame or iFrame? With this script i can get all element of the Frame ( There is only 1 Frame ): 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(0, "Frames Info", $sTxt) _IEQuit($oIE) Like the label, drop menu etc. but how to get the inputbox and set a text? Edited September 18, 2014 by Terenz Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
jdelaney Posted September 18, 2014 Share Posted September 18, 2014 Look through the HTML source, and check if one of your nodes ancestors is a <Frame> or <iFrame>. If it is, in the loop you just posted, use: $oYourobject = _IEGetObjById($oFrame,"yourNameYouWantToGet") MikahS 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Terenz Posted September 18, 2014 Author Share Posted September 18, 2014 Ok, thank you guys i'm working on it and if i have a problem i'll let you know Nothing is so strong as gentleness. Nothing is so gentle as real strength 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