Jump to content
  1. maniootek


  2. thegebi


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Beege
      Here is helper function for working with bitstamp api. Its actually two functions but one is just to set your keys. It will handle the authentication and should be able to handle any of the other private functions available that use POST. The public GET functions dont require authentication so you dont need this for those. Those could simply use InetRead. I have included some examples that include showing how to use the currency pairs and request parameters so I think how to use all the rest of the api functions should be easy to understand. I found some new short and sweet Epoch \ Unix timestamp functions along the way too that I dont think anyone has posted yet and will just post below for easy copy/paste. Both are standalone and utilize magic number 11644473600. Credits to ward. This uses his curl udf which is a tad bit out of of date and requires the SSL verification to be disabled. Its not that big of a deal since your data is still encrypted, but obviously not preferred so just fyi. 
      Be sure to keep an eye on the halving coming up soon (https://www.bitcoinblockhalf.com)  I expect to see a lot of fluctuations and its easy to gain a good amount of bitcoin when the prices fall and rise as much as they do.  If you have good luck and these functions helped you - feel free to donate to 1DwAsJ9hNNSwDXSiYyD9EkppuVgcBQMC8q   
      Bitstamp Example:
      #include <bitstamp.au3> ;Set your secret and api keys _BitstampAU3_SetKeys(" Your secret/private key goes here ", " Your API Key goes here ") ; ;Example getting Balance $json = _BitstampAU3("balance") ConsoleWrite($json & @CRLF) Json_Dump($json) ;Example getting Balance with currency_pair $json = _BitstampAU3("balance/btcusd") ConsoleWrite($json & @CRLF) Json_Dump($json) ;Example getting user_transactions with 3 request parameters $json = _BitstampAU3("user_transactions", "sort=asc&offset=2&limit=5") ConsoleWrite($json & @CRLF) Json_Dump($json) Unix Time Functions:
      ConsoleWrite(_UnixTime() & @CRLF) ConsoleWrite(_UnixTimeToLocal(_UnixTime()) & @CRLF) ; #FUNCTION# ==================================================================================================================== ; Description ...: Calculates number of seconds/milliseconds that have elapsed since the Unix epoch ; Parameters ....: $bMS - [optional] Set true to return timestamp as milliseconds ; Return values .: UTC/Epoch/Unix timestamp ; Author ........: Brian J Christy (Beege) ; Remarks .......: SystemTimeAsFileTime = number of 100-nanosecond intervals since January 1, 1601 ; 11644473600 = number of seconds between 1/1/1601 - 1/1/1970 ; unixtime = (seconds since January 1, 1601) - 11644473600 ; =============================================================================================================================== Func _UnixTime($bMS = False) Local $iUTC = (DllCall('kernel32.dll', 'none', 'GetSystemTimeAsFileTime', 'uint64*', 0)[1] / 10000000) - 11644473600 Return $bMS ? Floor($iUTC * 1000) : Floor($iUTC) EndFunc ;==>_UnixTime Func _UnixTimeToLocal($iUnixTime) Local $tSys = DllCall("kernel32.dll", "bool", "FileTimeToSystemTime", "uint64*", (($iUnixTime + 11644473600) * 10000000), "struct*", DllStructCreate("word[8]"))[2] Local $tLT = DllCall("kernel32.dll", "bool", "SystemTimeToTzSpecificLocalTime", "ptr", Null, "struct*", $tSys, "struct*", DllStructCreate("word tm[8]"))[3] Return StringFormat("%02d/%02d/%04d %02d:%02d:%02d", $tLT.tm(2), $tLT.tm(4), $tLT.tm(1), $tLT.tm(5), $tLT.tm(6), $tLT.tm(7)) EndFunc ;==>_UnixTimeLocal Bitstamp.zip
    • By Jahar
      Hi All,
      Please help me on how to fetch date/time of last windows 10 system restore point using autoit? Basically its about querying the last restore point.
    • By TheDcoder
      Hi everyone,
      I am bit stumped as to why I am not able to set the time in the Date control
      #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() GUICreate("My GUI get date", 200, 200, 800, 200) Local $idDate = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20, $DTS_TIMEFORMAT) ; to select a specific default format Local $sStyle = "HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) ; Set time Local $iRet = GUICtrlSetData($idDate, '13:33:37') ConsoleWrite('GUICtrlSetData returned ' & ($iRet = 1 ? 'success' : 'failure') & @CRLF) GUISetState(@SW_SHOW) ; Loop until the user exits. While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd MsgBox($MB_SYSTEMMODAL, "Time", GUICtrlRead($idDate)) EndFunc ;==>Example The documentation for GUICtrlSetData clearly mentions that it uses the same format as GUICtrlRead:
      But I get failure
      What gives?
      Thanks for the help in advance!
    • By ergo
      CronToTime.au3 UDF converts a Unix Cron expression into a DateTime string.
      On Unix systems a Cron expression made of five fields separated by blanks/tabs followed by a shell command to execute.

      e.g. 15-30 2,3,4,5 29 1-12 0-6 reboot
      +------------- minute (0 - 59)
      ¦ +------------- hour (0 - 23)
      ¦ ¦ +------------- day of month (1 - 31)
      ¦ ¦ ¦ +------------- month (1 - 12)
      ¦ ¦ ¦ ¦ +------------- day of week (0 - 6) (Sunday to Saturday, 7 is also Sunday)
      ¦ ¦ ¦ ¦ ¦ +------------- some shell command
      ¦ ¦ ¦ ¦ ¦ ¦
      ¦ ¦ ¦ ¦ ¦ ¦
      * * * * * reboot
      (In this UDF the 6th field has no meaning and no influence on the result).
      For more information see https://en.wikipedia.org/wiki/Cron

      Finds the next event of the specified Cron expression, starting from current UTC/GMT.
      _pce_findNextTimeUTC($sCronExp [, $bForwardSearch = True [, $minutesOffset = 0]]])
      Finds the next event of the specified Cron expression. If $sDateTime is not set, local time will be used.
      _pce_findNextTime($sCronExp [, $bForwardSearch = True [, $sDateTime = "" [, $minutesOffset = 0]]])
      Convert names in usable Cron expression values. e.g. "15-30 2,3,4,5 29 July-December Mo-Su" to "15-30 2,3,4,5 29 7-12 1-7"
      _pce_convertNames( $sCronExp )
      See the include for details.
      New version on GitHub: https://github.com/seizu/CronToTime
    • By Colduction
      Hi guys, i want to convert WebKit/Chrome timestamps that i've found in chrome cookie database to Human-Readable time (if possible, with UTC or GMT offset).
      Example of WebKit/Chrome timestamp: 13228999534132232 Output that i want: 2020-03-18 20:16:56 This site has a tool to do this work, but i wonder how to convert this time (this timestamp's time bases are 1600/01/01) to human-readable time:
  • Create New...