Jump to content

Question..


_Kurt
 Share

Recommended Posts

Okay, I would like to see if this would work. What I want to do: ban the user for 1 day. I thought that using MSLx Fanboy's 30 day trial script with slight modifications might work:

; 30 Day Trial
; Author MSLx Fanboy

#include<date.au3>
#include<string.au3>

If RegRead("HKCU\Software\Microsoft\Windows\Current Version", "XPClean Menu") = "" Then
    RegWrite("HKCU\Software\Microsoft\Windows\Current Version", "XPClean Menu", "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName))
    SetError(0)
EndIf
$startdate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", "XPClean Menu"), @ComputerName)

If _DateDiff("D", $startdate, _NowCalc()) > 30 Then
    MsgBox(0, "*XPClean Menu*", "You're registration period has expired.")
    Exit
EndIf

This is the original version, what I think might work would be to change:

If _DateDiff("D", $startdate, _NowCalc()) > 30 Then

To this:

If _DateDiff("D", $startdate, _NowCalc()) < 1 Then

My question: Would this work? (I doubt it would) and any suggestions or something similar to this?

Thanks,

Kurt

*EDIT* I realized that this would keep on banning the user, maybe some sort of ini read or filereadline could change this?

Edited by _Kurt

Awaiting Diablo III..

Link to comment
Share on other sites

So for example, I run the script today and in the original script it states

If _DateDiff("D", $startdate, _NowCalc()) > 30

Meaning that if the (StartDate) goes longer than 30 days, the trial will expire. So if i would add this:

If _DateDiff("D", $startdate, _NowCalc()) < 1

instead of what I wrote up there, that should mean that the program would be expired until one day passes. Correct?

So what I would do would be:

While 1
    $msg = GUIGetMsg()
    If $var = X Then 
        MsgBox(0, "", "You are now banned for one day.")
        If RegRead("HKCU\Software\Microsoft\Windows\Current Version", "XPClean Menu") = "" Then
            RegWrite("HKCU\Software\Microsoft\Windows\Current Version", "XPClean Menu", "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName))
            SetError(0)
        EndIf
        $startdate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", "XPClean Menu"), @ComputerName)
        If _DateDiff("D", $startdate, _NowCalc()) < 1 Then
            MsgBox(0, "",  "Your account is banned for 1 day.")
            Exit
            EndIf
    EndIf
Edited by _Kurt

Awaiting Diablo III..

Link to comment
Share on other sites

I am guessing, that those of us whom give our time to help others, do not like posts with this kind of title...

Question... Look inside

so, most real helpers dont even look

make a new post with a correct title reflecting your question/need and maybe you will get some assistance

8)

NEWHeader1.png

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...