NoizeBit Posted September 7, 2015 Share Posted September 7, 2015 (edited) Hi,I've spent quite a few hours trying to figure out how to set up a filter to show only the current day's entries on a broker's site. Basically, if you visit the site the "To" field automatically shows today's date which is just fine. But it's a real headache to set the same value for the "From" field as well...Any ideas how to set the same value there? The "To" field's input box is read-only and apparently doesn't have a value...Clicking on the filter from button activates a popup content enabling to select the month and day, but I have no clue how to get it done #include <IE.au3> Global $oIE = _IECreate("https://www.24option.com/24option/#TradingHistory", 0, 1, 1, 0) Sleep(3000) $tags = $oIE.document.GetElementsByTagName("div") For $tag In $tags $class_value = $tag.GetAttribute("class") If $class_value = "trading_history_dates_filter_from_button" Then $tag.click() ExitLoop EndIf NextAbove is the code so far. Any help or advice is much appreciated as always Edited September 7, 2015 by NoizeBit Link to comment Share on other sites More sharing options...
RaiNote Posted September 7, 2015 Share Posted September 7, 2015 Why you Need this?What do you want to do with this?Some questions which maybe the MVP would ask~ C++/AutoIt/OpenGL Easy Coder I will be Kind to you and try to help you till what you want isn't against the Forum Rules~ Link to comment Share on other sites More sharing options...
kylomas Posted September 7, 2015 Share Posted September 7, 2015 @RaiNote - Take it easy, there's nothing alarming here.@NoiseBit - Patience, someone facile with IE (which excludes ne) will be along sooner or later. kylomas NoizeBit 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
NoizeBit Posted September 7, 2015 Author Share Posted September 7, 2015 @RaiNote - Take it easy, there's nothing alarming here.@NoiseBit - Patience, someone facile with IE (which excludes ne) will be along sooner or later. kylomas@RaiNote - I understand it might look suspicious to some, but I only want to set a proper filter to be able to download a trading history report in csv.@kylomas - Thanks, I hope someone might have came across something like this and have an idea on how to proceed. Link to comment Share on other sites More sharing options...
jguinch Posted September 7, 2015 Share Posted September 7, 2015 Maybe you can try to set the value in the input directly :For $tag In $tags If $tag.className = "trading_history_dates_filter_from trading_history_dates_filter_from-readonly" Then $tag.value = "2015 Aug 10" NextAlso click on the input seems to do what you want, so :If $tag.className = "trading_history_dates_filter_from trading_history_dates_filter_from-readonly" Then _IEAction($tag, "click") Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
NoizeBit Posted September 8, 2015 Author Share Posted September 8, 2015 Maybe you can try to set the value in the input directly :For $tag In $tags If $tag.className = "trading_history_dates_filter_from trading_history_dates_filter_from-readonly" Then $tag.value = "2015 Aug 10" NextAlso click on the input seems to do what you want, so :If $tag.className = "trading_history_dates_filter_from trading_history_dates_filter_from-readonly" Then _IEAction($tag, "click") There's a reason why it's called read-only Clicking on it only brings up the calendar meaning it has the same effect as clicking on the button next to it... Link to comment Share on other sites More sharing options...
NoizeBit Posted September 8, 2015 Author Share Posted September 8, 2015 (edited) Just found out that no matter what filter I set up it doesn't apply to the exported csv file, so it will always contain all the records, so I'll have to remove the lines from the file by some method...Thanks anyway Edited September 8, 2015 by NoizeBit 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