Sign in to follow this  
Followers 0
_Kurt

Question..

8 posts in this topic

#1 ·  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..

Share this post


Link to post
Share on other sites



#2 ·  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..

Share this post


Link to post
Share on other sites

Today is the 2nd.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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


Awaiting Diablo III..

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

It's not "Manditory" it's just ... recommended and shows good forum sense.

Using a clear, concise topic shows a willingness to help us help you.

Oh, and by the way...

http://www.autoitscript.com/forum/index.ph...st&p=261496


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
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
Sign in to follow this  
Followers 0