naru Posted March 17, 2019 Author Posted March 17, 2019 5 minutes ago, rm4453 said: Here: #include <IE.au3> $oIE = _IEAttach ("Home") Local $date Local $oTds = _IETagNameGetCollection($oIE, "li") For $oTd In $oTds If $oTd.className = "nav navbar-btn" Then $idate = StringSplit($oTd.NextElementSibling.InnerText, " ")[2] ; Because there is a space at beginning it parses that in first spot so we show 2nd ExitLoop EndIf Next MsgBox(0, "date is", $idate)
Nine Posted March 17, 2019 Posted March 17, 2019 if there is too much variation in date/time format use regexp instead of stringsplit “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
rm4453 Posted March 17, 2019 Posted March 17, 2019 2 minutes ago, naru said: your code stuff is inserting ? marks verify there isn't any after copying fresh from here: Local $date Local $oTds = _IETagNameGetCollection($oIE, "li") For $oTd In $oTds If $oTd.className = "nav navbar-btn" Then $idate = StringSplit($oTd.NextElementSibling.InnerText, " ")[2] ; Because there is a space at beginning it parses that in first spot so we show 2nd ExitLoop EndIf Next MsgBox(0, "date is", $idate)
naru Posted March 17, 2019 Author Posted March 17, 2019 (edited) 1 hour ago, rm4453 said: your code stuff is inserting ? marks verify there isn't any after copying fresh from here: Local $date Local $oTds = _IETagNameGetCollection($oIE, "li") For $oTd In $oTds If $oTd.className = "nav navbar-btn" Then $idate = StringSplit($oTd.NextElementSibling.InnerText, " ")[2] ; Because there is a space at beginning it parses that in first spot so we show 2nd ExitLoop EndIf Next MsgBox(0, "date is", $idate) @rm4453 Thank You , But i want to use this date to make script expire. I am trying with this code but it was not working correctly #include <date.au3> #include <IE.au3> $ExpirationDate = '17/03/2020' $oIE = _IEAttach ("Home") Local $date Local $oTds = _IETagNameGetCollection($oIE, "li") For $oTd In $oTds If $oTd.className = "nav navbar-btn" Then $idate = StringSplit($oTd.NextElementSibling.InnerText, " ")[2] ; Because there is a space at beginning it parses that in first spot so we show 2nd ExitLoop EndIf Next ;~ MsgBox(0, "date is", $idate) If $idate > $ExpirationDate Then MsgBox(64, 'Info:', "I'm sorry but your license has ended") Edited March 17, 2019 by naru add code
FrancescoDiMuro Posted March 17, 2019 Posted March 17, 2019 1 hour ago, naru said: I am trying with this code but it was not working correctly More precisely, what is the result exptected, and what is not working now? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
naru Posted March 17, 2019 Author Posted March 17, 2019 1 hour ago, FrancescoDiMuro said: More precisely, what is the result exptected, and what is not working now? @FrancescoDiMuro This only follows the date, not month and Year. If the expired date (only date, not month and year) is smaller than the date it has been received get this msg : "I'm sorry but your license has ended". Although there is a big month or year, there is no difference, and the same msg is available. (I din't know english well, I hope you understand me as well)
rm4453 Posted March 20, 2019 Posted March 20, 2019 On 3/17/2019 at 11:05 AM, naru said: @FrancescoDiMuro This only follows the date, not month and Year. If the expired date (only date, not month and year) is smaller than the date it has been received get this msg : "I'm sorry but your license has ended". Although there is a big month or year, there is no difference, and the same msg is available. (I din't know english well, I hope you understand me as well) Put together what you can with below references, and report back if further help is needed. Refer to these: https://www.autoitscript.com/autoit3/docs/libfunctions/_NowDate.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_DateDiff.htm
FrancescoDiMuro Posted March 20, 2019 Posted March 20, 2019 (edited) 50 minutes ago, rm4453 said: Put together what you can with below references, and report back if further help is needed. He's banned from the Forum. Edited March 20, 2019 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
rm4453 Posted March 20, 2019 Posted March 20, 2019 Just now, FrancescoDiMuro said: He's banned from the Forum. good to know thanks for the heads up.
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