Leaderboard
Popular Content
Showing content with the highest reputation on 02/24/2020 in all areas
-
Just for the record, yes I am getting older .... all the time in fact. Not sure you can apply fat and lazy to me though, just because I prefer to usually give my coding help in other ways ... something I have always done ... prior to becoming MVP too. Take all the programs and scripts I regularly provide here or update, all for free ... no one makes me do it, and hardly something a lazy person would bother with. Here is a slightly related one to this topic ... there are others. And here is a doorway to many more, if mostly unrelated. And I have provided many many more. On behalf of all good fat people everywhere, I take offense. @Jos - Don't worry, this is not the start of an ongoing conversation, just illumination for those who need it. I will now leave this topic in peace.2 points
-
Coding Autoit & RESPECT
Dana86 reacted to Earthshine for a topic
@Dana86, well, you are just considering python vs autoit on Windows. Python runs on everything so you can do cross-platform development and testing with it. still, they are both nice scripting languages that I find highly useful. As for respect, punks out of college usually think they are hot to trot, so you can probably forget about respect these days. my kid is 20 now and still thinks he knows everything--despite the fact that I have way more experiences and education from which to draw on--so just consider the source I guess. lol1 point -
@Jos @RTFC @jchd @argumentum @Nine @TheSaint @LarsJ @condoman Thanks everyone for help. After a few days of tests where I used many different options i decided to stay with Dictionary. Edited main thread with solution for ppls with this same problem. Below speed results for using 3 methods to find user nr 100,000 where his table was {name, passwd, range, group}. [ADODB.Connection]: 8ms real-time save/write to file [_SQLite_]: 21ms real-time save/write to file [Dictionary+XML]: 0.06ms memory edit, to save file need spent additional 2s.1 point
-
The "error" comes from Au3Check. Use #AutoIt3Wrapper_Run_AU3Check=n to actually run the code (which works).1 point
-
1 point
-
No problem 🙂. But please check the delimiters in your loginfo.ini. The number of delimiters is not identical, so some entries do not match the headline, see :1 point
-
#include <Array.au3> #include <File.au3> #include <GUIConstants.au3> Global $aRetArray, $sSection = "" $gui = GUICreate("ListView items", 1000, 300, -1, -1, -1, $WS_EX_ACCEPTFILES) $listview = GUICtrlCreateListView("DATE|IP|PC NAME|USER NAME|OS TYPE|OS VER|DIMM 1|DIMM 2|DATE-TIME|-|-", 10, 10, 980, 280) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState() _FileReadToArray(@ScriptDir & "\Loginfo.ini", $aRetArray) For $i = 1 To $aRetArray[0] Step 1 ConsoleWrite($aRetArray[$i] & @CRLF) ; *** just for display If StringRegExp($aRetArray[$i], "^\[\d{8}\]$") Then $sSection = $aRetArray[$i] Else GUICtrlCreateListViewItem($sSection & "|" & $aRetArray[$i], $listview) EndIf Next GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 0, 100) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Check your Delimiter | in the .ini !1 point
-
try this little change to your script #include <Array.au3> #include <GUIConstants.au3> $gui = GUICreate("ListBiew items", 400, 300, -1, -1, -1, $WS_EX_ACCEPTFILES) $listview = GUICtrlCreateListView("IP|PC NAME|USER NAME|STATUS", 10, 10, 380, 280) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState() ;$File = FileOpenDialog("Select INI file", "", "(*.ini)") $File = @ScriptDir & "\Update.ini" $Sect = IniReadSectionNames($File) For $i = 1 To $Sect[0] $list = IniReadSection($File, $Sect[$i]) For $x = 1 To $list[0][0] $tmp = '' $tmp &= $list[$x][0] & '|' & $list[$x][1] ; & "|" GUICtrlCreateListViewItem($Sect[$i] & "|" & $tmp, $listview) Next Next GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 0, 100) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE1 point
-
It is working fine for me : #include <GUIConstants.au3> Opt('TrayMenuMode',3) Opt('TrayAutoPause',0) $gui = GUICreate("My GUI") $Button1 = GUICtrlCreateButton("Button1", 8, 8, 75, 25) $showgui = TrayCreateItem("Show") $hidegui = TrayCreateItem("Hide") $exitItem = TrayCreateItem("Exit") TraySetState() GUISetState (@SW_HIDE, $gui) While 1 $tMsg = TrayGetMsg() Switch $tMsg Case $showgui GUISetState(@SW_SHOW, $gui) Case $hidegui GUISetState(@SW_HIDE, $gui) Case $exitItem Exit EndSwitch $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 ConsoleWrite('ok pressed' & @CRLF) Case $GUI_EVENT_CLOSE GUIDelete () TrayItemDelete ($showgui) TrayItemDelete ($hidegui) EndSwitch Wend Tested both win 7 and win 10...1 point
-
GUIRegisterMsg20 - Subclassing Made Easy
argumentum reacted to LarsJ for a topic
A few updates and new 7z-file at bottom of first post.1 point -
Instead of ExitLoop, replace that line with GuiDelete (). But then show/hide won't work anymore, you may want to remove those options after deleting the GUI. Or you could hide the GUI instead of deleting it on Close...1 point
-
Did you wet your bed or something to trigger this unneeded response? Maybe next time just take a cold shower to clean/cool off and refrain from posting here is a better option? Jos1 point
-
Bitstamp API Helper
argumentum reacted to Beege for a topic
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 https://www.bitstamp.net/api/ 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.zip1 point -
Tested on 1k, 10k, 30k rows within memory DB attached to disk DB with a well balanced primary key. It stays around 0.32 ms per access to a single row fetch. I think with @jchdapproach, you should get the performance you are expecting. Now, you will have to show us that you have made some effort to understand SQLite, before we give you the code "tout cuit dans le bec".1 point
-
[Solved] Fast Real-Time File Read Write
TheSaint reacted to argumentum for a topic
The post may have been a bit harsh ( because I like TheSaint ), but I find the response justified, and would be eventually brought up at some random topic. There are posts to just bash, not contributing to the topic at hand, based on the OP. Those involved in aiding the OP can defend themselves without a new participant to "put the OP in it's place" and moving the attention from the issue at hand ( that of coding ). As a non-programmer, I understand the limitations of the OP and requesting a functional example to start from. As a veteran AutoIt forum member, I too would like to see what the OP has done. I too, don't wanna "mouth feed" code but see the OP becomes self sufficient. And at times "mouth feed" code is what is needed. I've done it myself with a good success rate in cranking up the OP brain0 points -
This is also a very convenient opinion if you are too fat, old, lazy or simply don't have the necessary coding skills. The active supporters today are a bunch of chit-chatting guys and not really coders. It would be desirable if we could get some more coders and a little less chit-chatting guys.0 points