Jump to content
Sign in to follow this  
Potar

Scripts Trial Problem.

Recommended Posts

Potar

Hello, i need help. This is my sctript. And I need add funcion 30 Day Trial, but i have problem i don't undestand this func:

http://www.autoitscript.com/forum/index.php?showtopic=19370&st=60&p=199599&#entry199599

Plese Add This Trial for my scripts:

Thanx very much!!!

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>


$klawiszREAD = FileReadLine("settings.ini", 2)
$czasREAD = FileReadLine("settings.ini", 4)
$cabal = FileReadLine("settings.ini", 6)


#Region ### START Koda GUI section ###
$Form1 = GUICreate("Pickup Cabal Online v.1.00 by karer", 313, 247, 180, 146)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("Jakim klawiszem zbierać drop?", 72, 8, 149, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input1 = GUICtrlCreateInput($klawiszREAD, 88, 32, 121, 21)
GUICtrlSetBkColor(-1, 0x316AC5)
$Label2 = GUICtrlCreateLabel("Co ile milisekund zbierać drop?", 72, 64, 149, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input2 = GUICtrlCreateInput($czasREAD, 88, 88, 121, 21)
GUICtrlSetBkColor(-1, 0x316AC5)
$Button1 = GUICtrlCreateButton("Start", 56, 112, 195, 57, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Wyjscie", 56, 176, 195, 33, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Pomoz karerowi", 112, 216, 91, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            WinWait($cabal)
            If WinActive($cabal) Then WinActivate($cabal)
            While 1
                Send(GUICtrlRead($Input1))
                Sleep(GUICtrlRead($Input2))
            WEnd
        Case $Button2
            Exit
        Case $Button3
            _IECreate("http://www.prisonwars.pl/79283/")
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites
water

Take the script and insert it after the line

#include <IE.au3>
.

Change "XPClean Menu" to the name of your script and everything should be fine.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Potar

Meaby you comlite my scripts? Becouse iam work in AutoIt 2 only days. :D

Share this post


Link to post
Share on other sites
Melba23

Potar,

Welcome to the AutoIt forum. :D

Just add the extra lines from MSLx Fanboy's snippet to your script after #include <IE3.au3> and change Your_Script_Name_Here to your required name. I have tried to explain what is going on:

#include <Date.au3>
#include <String.au3>

; Put the name of your  script here
$sScript_Name = "Your_Script_Name_Here"

; This part writes the date to the registry the first time the script is run
If RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name) = "" Then
    RegWrite("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name, "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName))
    SetError(0)
EndIf

; This part reads the encypted date from the registry
$sStartDate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name), @ComputerName)

; And this part decides if 30 days have passed!
If _DateDiff("D", $sStartDate, _NowCalc()) > 30 Then
    MsgBox(0, $sScript_Name, "Your trial period has expired.")
    Exit
EndIf

; And here is the rest of your script!!!!

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
water

I hope you've installed the full AutoIt with ScITe. Then just open the script and press F7 to generate the exe.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Potar

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Date.au3>
#include <String.au3>

; Put the name of your  script here
$sScript_Name = "Cabalpick.au3"

; This part writes the date to the registry the first time the script is run
If RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name) = "" Then
    RegWrite("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name, "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName))
    SetError(0)
EndIf

; This part reads the encypted date from the registry
$sStartDate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name), @ComputerName)

; And this part decides if 30 days have passed!
If _DateDiff("D", $sStartDate, _NowCalc()) > 30 Then
    MsgBox(0, $sScript_Name, "Your trial period has expired.")
    Exit
EndIf

; And here is the rest of your script!!!!
 
#include <IE.au3>


$klawiszREAD = FileReadLine("settings.ini", 2)
$czasREAD = FileReadLine("settings.ini", 4)
$cabal = FileReadLine("settings.ini", 6)


#Region ### START Koda GUI section ###
$Form1 = GUICreate("Pickup Cabal Online v.1.00 by karer", 313, 247, 180, 146)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("Jakim klawiszem zbierać drop?", 72, 8, 149, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input1 = GUICtrlCreateInput($klawiszREAD, 88, 32, 121, 21)
GUICtrlSetBkColor(-1, 0x316AC5)
$Label2 = GUICtrlCreateLabel("Co ile milisekund zbierać drop?", 72, 64, 149, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input2 = GUICtrlCreateInput($czasREAD, 88, 88, 121, 21)
GUICtrlSetBkColor(-1, 0x316AC5)
$Button1 = GUICtrlCreateButton("Start", 56, 112, 195, 57, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Wyjscie", 56, 176, 195, 33, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Pomoz karerowi", 112, 216, 91, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            WinWait($cabal)
            If WinActive($cabal) Then WinActivate($cabal)
            While 1
                Send(GUICtrlRead($Input1))
                Sleep(GUICtrlRead($Input2))
            WEnd
        Case $Button2
            Exit
        Case $Button3
            _IECreate("http://www.prisonwars.pl/79283/")
    EndSwitch
WEnd
not activist

Edited by Potar

Share this post


Link to post
Share on other sites
Melba23

Potar,

Very nearly! :D

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <Date.au3>
#include <String.au3>

; Put the name of your  script here
$sScript_Name = "Pickup Cabal Online"

; This part writes the date to the registry the first time the script is run
If RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name) = "" Then
    RegWrite("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name, "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName))
    SetError(0)
EndIf

; This part reads the encypted date from the registry
$sStartDate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name), @ComputerName)

; And this part decides if 30 days have passed!
If _DateDiff("D", $sStartDate, _NowCalc()) > 30 Then
    MsgBox(0, $sScript_Name, "Your trial period has expired.")
    Exit
EndIf

$klawiszREAD = FileReadLine("settings.ini", 2)
$czasREAD = FileReadLine("settings.ini", 4)
$cabal = FileReadLine("settings.ini", 6)

#Region ### START Koda GUI section ###
$Form1 = GUICreate("Pickup Cabal Online v.1.00 by karer", 313, 247, 180, 146)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("Jakim klawiszem zbierac drop?", 72, 8, 149, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input1 = GUICtrlCreateInput($klawiszREAD, 88, 32, 121, 21)
GUICtrlSetBkColor(-1, 0x316AC5)
$Label2 = GUICtrlCreateLabel("Co ile milisekund zbierac drop?", 72, 64, 149, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input2 = GUICtrlCreateInput($czasREAD, 88, 88, 121, 21)
GUICtrlSetBkColor(-1, 0x316AC5)
$Button1 = GUICtrlCreateButton("Start", 56, 112, 195, 57, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Wyjscie", 56, 176, 195, 33, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Pomoz karerowi", 112, 216, 91, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            WinWait($cabal)
            If WinActive($cabal) Then WinActivate($cabal)
            While 1
                Send(GUICtrlRead($Input1))
                Sleep(GUICtrlRead($Input2))
            WEnd
        Case $Button2
            Exit
        Case $Button3
            _IECreate("http://www.prisonwars.pl/79283/")
    EndSwitch
WEnd

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Potar

Thx all...

Why if iam start this scripts i dont have any massage?

I need this text: "You're have 29days to use." Tommorow "You're have 28days to use."

Evryone help me? :D

Share this post


Link to post
Share on other sites
Potar

[Edit]

Or this:

#Region ### START Koda GUI section ###
$Form1 = GUICreate("Pickup Cabal Online v.1.00 by karer (USE DAYS/30)", 313, 247, 180, 146)

Today:

Region ### START Gui section###
$Form1 = GUICreate("Klik Bot v. 1.00 (0/30)", 315, 300, 180, 146)
GUISetBkColor(0xb92e2e)

Tommorrow:

Region ### START Gui section###
$Form1 = GUICreate("Klik Bot v. 1.00 (1/30)", 315, 300, 180, 146)
GUISetBkColor(0xb92e2e)

This scripts not activist:

Region ### START Gui section###
$Form1 = GUICreate("Klik Bot v. 1.00 ($sStartDate/30)", 315, 300, 180, 146)
GUISetBkColor(0xb92e2e)
Edited by Potar

Share this post


Link to post
Share on other sites
water

Change

; And this part decides if 30 days have passed!
If _DateDiff("D", $sStartDate, _NowCalc()) > 30 Then
    MsgBox(0, $sScript_Name, "Your trial period has expired.")
    Exit
EndIf
to
; And this part decides if 30 days have passed!
$diff = _DateDiff("D", $sStartDate, _NowCalc())
If $diff > 30 Then
    MsgBox(0, $sScript_Name, "Your trial period has expired.")
    Exit
Else
    MsgBox(0, $sScript_Name, "Your have " & 30 - $diff & " days left.")
EndIf

Or for the title:

$diff = _DateDiff("D", $sStartDate, _NowCalc())
$Form1 = GUICreate("Pickup Cabal Online v.1.00 by karer (" & $diff & "/30)", 313, 247, 180, 146)
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Potar

OMG Thx Very Much!!! I love this Forum and AutoIT. Very Fast i have answers THX!

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  

×