TJ123 Posted July 16, 2012 Share Posted July 16, 2012 I am trying use ControlSend and ControlSet Text to enter some information in an IE form. I was also hoping to make a selection from a drop down menu. However when I use AutoIt Window Info on these controls I do not get a Name or ID when using IE. I tried using Chrome and I do get a control ID number, but it is the same for all the controls in this area. This is what AutoIt Window Info returns for all the controls on the part of the page I am working with while running IE: Class: Internet Explorer_Server Instance: 3 ClassnameNN: Internet Explorer_Server3 Name: Advanced Mode: [CLASS:Internet Explorer_Server; INSTANCE:3] ID: Text: Position 0, 91 Size 1090, 757 Control Click Coords 45, 28 Style 0x56000000 ExStyle 0x00000000 Handle 0x000000000029021A Any suggestions as to how I can work with these controls is greatly appreciated! TJ. Link to comment Share on other sites More sharing options...
PhoenixXL Posted July 16, 2012 Share Posted July 16, 2012 (edited) Something unique must be present it may be the classname or value for more help please give the Site Address Hope so u r not violating any of the forum rules Edited July 16, 2012 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
TJ123 Posted July 16, 2012 Author Share Posted July 16, 2012 No, I do not think I am breaking any rules. I am trying to create a script that will go to the Google Currency Exchange page and check the exchange rates on a few currencies and record them to a text file, along with the time and date.The Google Exchange page can be found here: http://www.google.com/finance/converterI also tried using the Bank of Canada exchange site with similar issues. It can be found here: http://www.bankofcanada.ca/rates/exchange/daily-converter/Any assistance getting the Name or ID of the controls on these pages would be greatly appreciated!Thanks for any help,TJ. Link to comment Share on other sites More sharing options...
Mithrandir Posted July 16, 2012 Share Posted July 16, 2012 (edited) I would rather use the IE UDF, search in the help file for _IECreate , _IEFormGetObjByName, _IEFormElementOptionselect . To inspect the DOM of a page in Internet Explorer you can use debugbar. Try it and if you have any doubt ask again. Edited July 16, 2012 by Mithrandir Help with SOAP message!! Link to comment Share on other sites More sharing options...
TJ123 Posted July 17, 2012 Author Share Posted July 17, 2012 (edited) Thanks for your ideas Mithrandir. I was looking at the IE UDF earlier today. It looked a bit more complicated than using ControlSend, but is obviously more powerful in many respects. One question, I tried using "View Source" to look at the page and see if I could find anything. Is using dubugbar to inspect the DOM going to help me find the Name and/or ID attributes that I was looking for originally? Would this show the Name or ID when the AutoIt Window Info Tool does not? From what I was reading it looked like I would still need the control Name or ID to make full use of the IE UDF, am I mistaken about that? Thanks for any help you can provide, TJ. Edited July 17, 2012 by TJ123 Link to comment Share on other sites More sharing options...
Mithrandir Posted July 17, 2012 Share Posted July 17, 2012 (edited) Thanks for your ideas Mithrandir. I was looking at the IE UDF earlier today. It looked a bit more complicated than using ControlSend, but is obviously more powerful in many respects.One question, I tried using "View Source" to look at the page and see if I could find anything. Is using dubugbar to inspect the DOM going to help me find the Name and/or ID attributes that I was looking for originally? Would this show the Name or ID when the AutoIt Window Info Tool does not? From what I was reading it looked like I would still need the control Name or ID to make full use of the IE UDF, am I mistaken about that?Thanks for any help you can provide,TJ.Oh, I see, you are mistaking the ID of a window with the ID of an object of an HTML document. Look, the autoit window info is useful to automatize windows like in the winzip auto install that is in the beginning of the helpfile.Now, to automatize Internet Explorer with the IE UDF, (I assume you have basic knowledge of HTML, if not I would recommend http://www.w3schools.com/html/default.asp ) you have to look in the source code either as you did with ´view source´ or with the help of tools like firebug for firefox or debugbar for IE. There you will find elements with tags like <form name= or <form id=When an element does not have name or id you can get them by index (first form in the code is 0, second is 1 and so on). With that information, you can make your script.For instance, in the source of http://www.google.com/finance/converter you can see there's a form with this code:<form action="/finance/converter" method="f"> (......)Its name is 'f' go get it with _IEFormGetObjByName and it has a select with this code: <select name=from value=""><option value="AED">United Arab Emirates Dirham (AED)</option> (.....)There you can use _IEFormElementOptionselect after using IEGetObjByIdTry it and show some code even if it doesn't work or If you didn't understand something just ask. Edited July 17, 2012 by Mithrandir Help with SOAP message!! Link to comment Share on other sites More sharing options...
TJ123 Posted July 18, 2012 Author Share Posted July 18, 2012 Hey Mithrandir, Thank you very much for the info. I was really busy the past two days, but I am going to try a few things today based on your suggestions. I was not aware that method="f" meant that it's name was "f". Just knowing that may help me figure things out from here. Thanks again, TJ. Link to comment Share on other sites More sharing options...
JohnOne Posted July 18, 2012 Share Posted July 18, 2012 I was not aware that method="f" meant that it's name was "f". I'm 99% certain that it does not. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
DaleHohm Posted July 18, 2012 Share Posted July 18, 2012 (edited) I'm 99% certain that it does not.Make that 100% certain. Use _IEFormGetCollection with an index parameter if there is no name= or id=.Dale Edited July 18, 2012 by DaleHohm 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...
TJ123 Posted July 18, 2012 Author Share Posted July 18, 2012 Hi, Thanks for the advice. I was just looking at the page source and the name is "f", the method is "get". I think Mithrandir might have just made a typo or a cut/paste error. But thanks for the help, it is appreciated! TJ. Link to comment Share on other sites More sharing options...
Mithrandir Posted July 19, 2012 Share Posted July 19, 2012 Hi,Thanks for the advice. I was just looking at the page source and the name is "f", the method is "get". I think Mithrandir might have just made a typo or a cut/paste error.But thanks for the help, it is appreciated!TJ.Yes, my bad, I wanted to paste<form action="/finance/converter" method="get" name="f">Sorry for the mistake . It's good to see you figuring things out and using the IE udf. If you need any help ask again. I remember the days when I was starting with the IE udf and DaleHohm helped me a lot (by the way now that I saw his signature I think that was because of him that I downloaded debugbar Help with SOAP message!! 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