sathish Posted May 10, 2012 Share Posted May 10, 2012 (edited) Hi forum, Here is my code #include <IE.au3> $oIE = _IECreate("http://www.ncbi.nlm.nih.gov/pubmed/22561075") _IELoadWait($oIE) ; get pointers to the login form and username and password fields $oform = _IEFormGetObjByName($oIE, "EntrezForm") $radio = _IEFormElementGetObjByName($oform, "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPresentation") _IELinkClickByText ($oIE, "Display Settings:") Problem: I need to select this radio button XML (Value: 6) and then i have to click Apply, This popup seems like a javascript, Note: This is not for any gaming purpose Below is the screen shot of that popup Please suggest me Kindly help me in this Edited May 10, 2012 by sathish Link to comment Share on other sites More sharing options...
sathish Posted May 10, 2012 Author Share Posted May 10, 2012 (edited) Here is my updated code, which clicks Radio button too, now just one more button left, that is the Apply button Please suggest #include <IE.au3> $oIE = _IECreate("http://www.xxx.xx.xx.com") _IELoadWait($oIE) $oform = _IEFormGetObjByName($oIE, "EntrezForm") $radio = _IEFormElementGetObjByName($oform, "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPresentation") _IELinkClickByText ($oIE, "Display Settings:") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") for $element in $oArray if $element.value="xml" Then $element.checked=true next Is this task really very tough?? This is my fifth post, without any solution??, Very tired Here with i have attached the html code of my sitepubmed1.htm Edited May 11, 2012 by sathish Link to comment Share on other sites More sharing options...
sathish Posted May 17, 2012 Author Share Posted May 17, 2012 It is wrong to bump the thread, but 6 days i waited and now i bumped Link to comment Share on other sites More sharing options...
DaleHohm Posted May 17, 2012 Share Posted May 17, 2012 There is nothing in your code that attempts to get a reference to the Apply button or to click it. What have you tried? Have you found the Apply button inthe HTML? what does the tag look likke? Have you used DebugBar or a similar tool to help you? 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...
sathish Posted May 18, 2012 Author Share Posted May 18, 2012 (edited) There is nothing in your code that attempts to get a reference to the Apply button or to click it. What have you tried? Have you found the Apply button inthe HTML? what does the tag look likke? Have you used DebugBar or a similar tool to help you? Dale Thanks for the reply Here is my code #include <IE.au3> $oIE = _IECreate("http://xxx") _IELoadWait($oIE) ; get pointers to the login form and username and password fields $oform = _IEFormGetObjByName($oIE, "EntrezForm") $radio = _IEFormElementGetObjByName($oform, "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPresentation") _IELinkClickByText ($oIE, "Display Settings:") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") for $element in $oArray if $element.value="xml" Then $element.checked=true next Please execute and see The problem is i need to select the radio button (xml) then i need to click apply I have written the code till clicking radio button, after that i dont know how to proceed I tried all the codes related to (_IEForm), but nothing seems working Please guide me Thanks in advance Edited May 21, 2012 by sathish Link to comment Share on other sites More sharing options...
DaleHohm Posted May 18, 2012 Share Posted May 18, 2012 First, answer these questions:Have you found the Apply button inthe HTML? what does the tag look like? Have you used DebugBar or a similar tool to help you?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...
sathish Posted May 19, 2012 Author Share Posted May 19, 2012 (edited) First, answer these questions: Dale Here is the apply button <button name="EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.SetDisplay" sid="1" class="button_apply ncbipopper-close-button">Apply</button> . . . . . var ActiveNames = {"p$ExL":1, "EntrezSystem2.PEntrez.DbConnector.Cmd":0, "EntrezSystem2.PEntrez.DbConnector.Db":0, "EntrezSystem2.PEntrez.DbConnector.IdsFromResult":0, "EntrezSystem2.PEntrez.DbConnector.LastDb":0, "EntrezSystem2.PEntrez.DbConnector.LastIdsFromResult":0, "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.SetDisplay":0, "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.Sort":0, }; But i dont know anything about Debugbar, Please excuse me, I am a beginner Have you tried to execute my script??? Edited May 19, 2012 by sathish Link to comment Share on other sites More sharing options...
searchresult Posted May 19, 2012 Share Posted May 19, 2012 Here... _IELinkClickByIndex($oIE, 1) Link to comment Share on other sites More sharing options...
DaleHohm Posted May 19, 2012 Share Posted May 19, 2012 If that's your buton and there are not frames, $oButton = _IEGetObjByName($oIE, "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.SetDisplay") _IEAction($oButton, "click") find a link to DebugBar in my sig. 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...
wakillon Posted May 20, 2012 Share Posted May 20, 2012 Javascript detect if it's clicked, so the xml radio must be clicked instead of the method you use. Try this #include <IE.au3> $oIE = _IECreate("http://www.ncbi.nlm.nih.gov/pubmed/22561075") _IELoadWait($oIE) ; get pointers to the login form and username and password fields $oform = _IEFormGetObjByName($oIE, "EntrezForm") $radio = _IEFormElementGetObjByName($oform, "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPresentation") _IELinkClickByText ($oIE, "Display Settings:") ; <label for="xmltext">XML</label> Local $oSubmit = _IEGetObjByName ( $oIE, 'xmltext' ) _IEAction ( $oSubmit, 'click' ) _IELoadWait($oIE) ;~ <button name="EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.SetDisplay" sid="1" class="button_apply ncbipopper-close-button">Apply</button> Sleep ( 1000 ) Local $oSubmit = _IEGetObjByName ( $oIE, 'EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.SetDisplay' ) _IEAction ( $oSubmit, 'click' ) _IELoadWait ( $oIE ) sathish 1 AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
DaleHohm Posted May 20, 2012 Share Posted May 20, 2012 Using _IEFormElementRadioSelect() #include <IE.au3> $oIE = _IECreate("[url="http://www.ncbi.nlm.nih.gov/pubmed/22561075"]http://www.ncbi.nlm.nih.gov/pubmed/22561075[/url]") $oForm = _IEFormGetObjByName($oIE, "EntrezForm") $sRadioGroupName = "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPresentation" $sButtonName = "EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DisplayBar.SetDisplay" _IELinkClickByText ($oIE, "Display Settings:") _IEFormElementRadioSelect($oForm, "xml", $sRadioGroupName, 1, "byValue") $oApply = _IEGetObjByName ($oIE, $sButtonName) _IEAction ( $oApply, 'click' ) Dale sathish 1 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...
sathish Posted May 21, 2012 Author Share Posted May 21, 2012 Sorry for the late reply,Now only i saw the thread,Thanks for your kind help DaleHohm, wakillon, and searchresult, The script is working fine nowOnce again thanks for your kind repliesThanks & RegardsSathish V. Link to comment Share on other sites More sharing options...
wakillon Posted May 21, 2012 Share Posted May 21, 2012 Glad to help you ! sathish 1 AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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