Shanheavel Posted March 5, 2011 Share Posted March 5, 2011 (edited) Hello,I'm using FF.au3 from topic and I want to get value by ID. HTML code:<div id="SomeID" tip="Text of tip">Text</div>I want to get "Text" (and "Text of tip" if it is possible).$sInput = _FFObjGet("SomeID", "id"); Returns a string $Val = _FFObj($sInput, "id"); MsgBox(64, "Value by ID", $Val)It works but:_FFObj($sInput, "id") returns "Some ID"_FFObj($sInput, "value") returns nothing.Thanks for help PS: _FFGetValueById doesn't work too. Edited March 5, 2011 by Adrian777 Link to comment Share on other sites More sharing options...
Stilgar Posted March 5, 2011 Share Posted March 5, 2011 (edited) Hello, I'm using FF.au3 from topic and I want to get value by ID. HTML code: <div id="SomeID" tip="Text of tip">Text</div> I want to get "Text" (and "Text of tip" if it is possible). $sInput = _FFObjGet("SomeID", "id"); Returns a string $Val = _FFObj($sInput, "id"); MsgBox(64, "Value by ID", $Val) It works but: _FFObj($sInput, "id") returns "Some ID" _FFObj($sInput, "value") returns nothing. Thanks for help PS: _FFGetValueById doesn't work too. Hello, there's no attribute "value" in this "div", so _FFObj returns nothing. If you wanna have the "text" in this division you must use "textContent" not "value". _FFGetValueById is deprecated -> please use _FFGetValue("SomeID", "id") instead. And for the "tip": $sInput = _FFObjGet("SomeID", "id") $sTip = _FFObj($sInput, "tip") Stilgar Edited March 5, 2011 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
Shanheavel Posted March 5, 2011 Author Share Posted March 5, 2011 (edited) @StilgarThanks for reply. Before you posted I try to use _FFReadHTML() and search string (it's very slow).$sInput = _FFObjGet("SomeID", "id") $sTip = _FFObj($sInput, "textContent")It works great but only for "textContent". With tip returns nothing. Edited March 5, 2011 by Adrian777 Link to comment Share on other sites More sharing options...
Stilgar Posted March 5, 2011 Share Posted March 5, 2011 @Stilgar Thanks for reply. Before you posted I try to use _FFReadHTML() and search string (it's very slow). $sInput = _FFObjGet("SomeID", "id") $sTip = _FFObj($sInput, "textContent") It works great but only for "textContent". With tip returns nothing. Have you the console-output for the problem with the "tip", too, please? Yes, _FFReadHTML is very slow. The fastest function to get informations like that is _FFXpath: $sText = _FFXpath("//div[@id='SomeID']", "textContent", 2) Stilgar jEdit4AutoIt PlanMaker_UDF 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