darkmaster071 Posted July 4, 2009 Share Posted July 4, 2009 (edited) So i have a javascript button that links you to another page, and i would like to extract that value with Autoit to a variable and use that link in my code. How do i do that? Help much appreciated. Edit: For those who want to know the solution: I targeted the button with _IEGetObjById, then i used _IEPropertyGet outerhtml on it to get the text, then i just played a little with _StringBetween to get the link i wanted. Btw thanks alot Dale. Edited July 4, 2009 by darkmaster071 Link to comment Share on other sites More sharing options...
DaleHohm Posted July 4, 2009 Share Posted July 4, 2009 Suggestions: use DebugBar to figure out the page struction. Look at _IE*GetObj* functions, look at _IEPropertyGet outerhtml, ready MSDN. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
darkmaster071 Posted July 4, 2009 Author Share Posted July 4, 2009 Alright i managed to target and click the button with _IEGetObjById. But i seem to fail at every attempt to convert that button link to a variable. Can you please be more specific about that. Thanks. Link to comment Share on other sites More sharing options...
DaleHohm Posted July 8, 2009 Share Posted July 8, 2009 _IEGetObjById returns an object variable. $oButton = _IEGetObjById($oIE, "the-id") Please study the IE examples in the helpfile. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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