Jump to content

Scripts Trial Problem.


Potar
 Share

Recommended Posts

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
Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

#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
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

[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
Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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