Potar Posted January 27, 2010 Share Posted January 27, 2010 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!!! expandcollapse popup#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 More sharing options...
water Posted January 27, 2010 Share Posted January 27, 2010 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Potar Posted January 27, 2010 Author Share Posted January 27, 2010 Meaby you comlite my scripts? Becouse iam work in AutoIt 2 only days. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 27, 2010 Moderators Share Posted January 27, 2010 Potar,Welcome to the AutoIt forum. 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
water Posted January 27, 2010 Share Posted January 27, 2010 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Potar Posted January 27, 2010 Author Share Posted January 27, 2010 (edited) expandcollapse popup#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 WEndnot activist Edited January 27, 2010 by Potar Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 27, 2010 Moderators Share Posted January 27, 2010 Potar, Very nearly! expandcollapse popup#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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Potar Posted January 27, 2010 Author Share Posted January 27, 2010 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? Link to comment Share on other sites More sharing options...
Potar Posted January 27, 2010 Author Share Posted January 27, 2010 (edited) [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 January 27, 2010 by Potar Link to comment Share on other sites More sharing options...
water Posted January 27, 2010 Share Posted January 27, 2010 (edited) 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 EndIfto; 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 January 27, 2010 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Potar Posted January 27, 2010 Author Share Posted January 27, 2010 OMG Thx Very Much!!! I love this Forum and AutoIT. Very Fast i have answers THX! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now