Jump to content

Recommended Posts

Posted
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)

 

543526718_unabletoparseline.JPG.f10736d4c629d869fa18c55bd5b0bdb7.JPG

Posted
2 minutes ago, naru said:

543526718_unabletoparseline.JPG.f10736d4c629d869fa18c55bd5b0bdb7.JPG

image.png.da5582a149ebeb397befc8dcea250e99.png

 

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)

 

Posted (edited)
1 hour ago, rm4453 said:

image.png.da5582a149ebeb397befc8dcea250e99.png

 

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 by naru
add code
Posted
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)

 

Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...