Jump to content

Recommended Posts

Posted (edited)

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..

Posted (edited)

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..

Posted

Today is the 2nd.

Woops just realized that, edited 2nd post. Hopefully someone understands what I'm trying to do and how I'm trying to do it :whistle:

Awaiting Diablo III..

Posted

Sorry to bump, but, Does ANYONE have ANY idea's? Does anyone think this is right?

Awaiting Diablo III..

Posted

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

Posted

Arg, nevermind, I'll just try and figure this out myself. I was just asking for a little help, I didn't know that making a correct title was mandatory.

Awaiting Diablo III..

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
  • Recently Browsing   0 members

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