Leaderboard
Popular Content
Showing content with the highest reputation on 03/25/2024 in all areas
-
Binance api array extract and sort
jimmy999 and one other reacted to AspirinJunkie for a topic
I would also do some advertising, as the data fits very well for this. With the TableData UDF you can simplify things quite a bit: #include "Json.au3" #include "TableData.au3" Local $sJSON = '[{"symbol":"ETHBTC","priceChange":"-0.00031000","priceChangePercent":"-0.595","weightedAvgPrice":"0.05197174","prevClosePrice":"0.05213000","lastPrice":"0.05182000","lastQty":"20.06760000","bidPrice":"0.05182000","bidQty":"23.61320000","askPrice":"0.05183000","askQty":"30.12050000","openPrice":"0.05213000","highPrice":"0.05243000","lowPrice":"0.05156000","volume":"24595.97310000","quoteVolume":"1278.29551268","openTime":1711203672778,"closeTime":1711290072778,"firstId":438016051,"lastId":438113829,"count":97779},{"symbol":"LTCBTC","priceChange":"0.00001600","priceChangePercent":"1.192","weightedAvgPrice":"0.00134319","prevClosePrice":"0.00134200","lastPrice":"0.00135800","lastQty":"1.64000000","bidPrice":"0.00135800","bidQty":"2.93700000","askPrice":"0.00135900","askQty":"135.64200000","openPrice":"0.00134200","highPrice":"0.00137700","lowPrice":"0.00131400","volume":"99931.64700000","quoteVolume":"134.22719281","openTime":1711203670214,"closeTime":1711290070214,"firstId":96069410,"lastId":96092177,"count":22768},{"symbol":"BNBBTC","priceChange":"-0.00016800","priceChangePercent":"-1.927","weightedAvgPrice":"0.00860063","prevClosePrice":"0.00871800","lastPrice":"0.00854800","lastQty":"0.75000000","bidPrice":"0.00854600","bidQty":"1.01500000","askPrice":"0.00854700","askQty":"0.51100000","openPrice":"0.00871600","highPrice":"0.00871700","lowPrice":"0.00849800","volume":"26867.77800000","quoteVolume":"231.07994652","openTime":1711203672378,"closeTime":1711290072378,"firstId":237459363,"lastId":237516989,"count":57627},{"symbol":"NEOBTC","priceChange":"0.00000050","priceChangePercent":"0.220","weightedAvgPrice":"0.00023046","prevClosePrice":"0.00022710","lastPrice":"0.00022740","lastQty":"2.80000000","bidPrice":"0.00022720","bidQty":"40.03000000","askPrice":"0.00022750","askQty":"31.85000000","openPrice":"0.00022690","highPrice":"0.00023590","lowPrice":"0.00022540","volume":"19836.53000000","quoteVolume":"4.57156205","openTime":1711203663295,"closeTime":1711290063295,"firstId":46240496,"lastId":46242649,"count":2154},{"symbol":"QTUMETH","priceChange":"0.00001700","priceChangePercent":"1.340","weightedAvgPrice":"0.00129800","prevClosePrice":"0.00127600","lastPrice":"0.00128600","lastQty":"0.90000000","bidPrice":"0.00128700","bidQty":"45.50000000","askPrice":"0.00129000","askQty":"354.40000000","openPrice":"0.00126900","highPrice":"0.00131600","lowPrice":"0.00126700","volume":"5090.00000000","quoteVolume":"6.60683920","openTime":1711203643004,"closeTime":1711290043004,"firstId":5437599,"lastId":5437748,"count":150}]' ; parse JSON and convert the structure into a table object $mData = _td_MapsToTable(_JSON_Parse($sJSON)) ; sort data - to do this convert attribute into number type and use this as comparison value _td_Sort($mData, "Number($x.priceChangePercent)", True) ; show data _td_display($mData)2 points -
GuiBuilderPlus [updated March 24, 2024]
ioa747 and one other reacted to kurtykurtyboy for a topic
It's been a while... updated with some fixes and improvements. FIXED: Wrong line endings when copying from code preview window FIXED: Issue changing properties when Obect Explorer window is not open FIXED: Issue when selecting controls under certain other conditions FIXED: SaveAs keyboard shortcut FIXED: Undo/Redo for Global property ADDED: Auto-size property for Labels, Buttons, and Inputs2 points -
AutoItHelp v3.3.16.1 with external CSS loading
donnyh13 reacted to argumentum for a topic
if the "Copy to clipboard" is: <a href="#" id="copy" onclick="copyToClipboard( we can make <a href="#" id="anything" onclick="openTheExampleA( That way emulation (edge) is not needed.1 point -
AutoItHelp v3.3.16.1 with external CSS loading
argumentum reacted to donnyh13 for a topic
Okay, sounds good. I look forward to your findings. The difference I noticed was between and replaced with: Which allowed me to use @media (min-resolution: 72dpi) { body { text-decoration: underline; } } Ya, I forgot that too. Yes, should be easy. I may not get a chance today, but will try soon to add it.1 point -
AutoItHelp v3.3.16.1 with external CSS loading
donnyh13 reacted to argumentum for a topic
The original is: <!DOCTYPE html> <html><head> <meta charset="utf-8"> and the one I tested is: <!DOCTYPE html> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text-html;charset=UTF-8"> if that made the difference, then I guess that is going to be the new <META ... >, as it uses the default IE for the CHM and shows to work well. I'll take a look at it tomorrow. I'll be busy the rest of the day today. Anything that can be done for the mouse-over color and underscore on the "Open this Script" link, to make it look like the "Copy to clipboard" one ? Do change the html if it's needed.1 point -
AutoItHelp v3.3.16.1 with external CSS loading
argumentum reacted to donnyh13 for a topic
par excellence ! (cool french word for "excellent" (in my mind)) That's great, much simpler fixes are always a better option! In re: to your tests, I don't understand it all, but the newer CSS features didn't work until I used Emulation, so there still has to be a difference? Idk. Doesn't matter now, it works as is . Thanks for testing it! Hope it ends up being a total fix now.1 point -
AutoItHelp v3.3.16.1 with external CSS loading
donnyh13 reacted to argumentum for a topic
Looks great ! ( this is a pic. of some testing with the worth of changing the IE engine ) So, CSS. Look at that. Awesome !. No longer relevant but here's the testing I was doing: Even the "Open this Script" button looks good, ..until I Ctrl + "+" to zoom in. Then the link style ( Example 2 ) is the winner, as it behaves impeccably as far as size and alignment. Ok, then emulation is not needed and it looks just great with the CSS tweaks.1 point -
image and button with koda
teodoric666 reacted to Andreik for a topic
You can do something like this: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 598, 420, 192, 124) $Pic1 = GUICtrlCreatePic("C:\Users\dede\Desktop\test.jpg", 0, 8, 617, 425) GUICtrlSetState($Pic1, $GUI_DISABLE) $Button1 = GUICtrlCreateButton("Button1", 400, 112, 113, 49) $Button2 = GUICtrlCreateButton("Button2", 400, 176, 113, 57) $Input1 = GUICtrlCreateInput("Input1", 32, 8, 521, 21) $Input2 = GUICtrlCreateInput("Input2", 48, 360, 505, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edit: by the way, use code tag when you want to post code instead of uploading the script.1 point -
Beside invalid syntax it looks like the json is decoded to objects without keys. I don't investigate this further but using this json UDF it work pretty nice: #include <Array.au3> #include <Json.au3> Local $aGainers[1][2] = [['Symbol', 'Change %']] Local $sJSON = '[{"symbol":"ETHBTC","priceChange":"-0.00031000","priceChangePercent":"-0.595","weightedAvgPrice":"0.05197174","prevClosePrice":"0.05213000","lastPrice":"0.05182000","lastQty":"20.06760000","bidPrice":"0.05182000","bidQty":"23.61320000","askPrice":"0.05183000","askQty":"30.12050000","openPrice":"0.05213000","highPrice":"0.05243000","lowPrice":"0.05156000","volume":"24595.97310000","quoteVolume":"1278.29551268","openTime":1711203672778,"closeTime":1711290072778,"firstId":438016051,"lastId":438113829,"count":97779},{"symbol":"LTCBTC","priceChange":"0.00001600","priceChangePercent":"1.192","weightedAvgPrice":"0.00134319","prevClosePrice":"0.00134200","lastPrice":"0.00135800","lastQty":"1.64000000","bidPrice":"0.00135800","bidQty":"2.93700000","askPrice":"0.00135900","askQty":"135.64200000","openPrice":"0.00134200","highPrice":"0.00137700","lowPrice":"0.00131400","volume":"99931.64700000","quoteVolume":"134.22719281","openTime":1711203670214,"closeTime":1711290070214,"firstId":96069410,"lastId":96092177,"count":22768},{"symbol":"BNBBTC","priceChange":"-0.00016800","priceChangePercent":"-1.927","weightedAvgPrice":"0.00860063","prevClosePrice":"0.00871800","lastPrice":"0.00854800","lastQty":"0.75000000","bidPrice":"0.00854600","bidQty":"1.01500000","askPrice":"0.00854700","askQty":"0.51100000","openPrice":"0.00871600","highPrice":"0.00871700","lowPrice":"0.00849800","volume":"26867.77800000","quoteVolume":"231.07994652","openTime":1711203672378,"closeTime":1711290072378,"firstId":237459363,"lastId":237516989,"count":57627},{"symbol":"NEOBTC","priceChange":"0.00000050","priceChangePercent":"0.220","weightedAvgPrice":"0.00023046","prevClosePrice":"0.00022710","lastPrice":"0.00022740","lastQty":"2.80000000","bidPrice":"0.00022720","bidQty":"40.03000000","askPrice":"0.00022750","askQty":"31.85000000","openPrice":"0.00022690","highPrice":"0.00023590","lowPrice":"0.00022540","volume":"19836.53000000","quoteVolume":"4.57156205","openTime":1711203663295,"closeTime":1711290063295,"firstId":46240496,"lastId":46242649,"count":2154},{"symbol":"QTUMETH","priceChange":"0.00001700","priceChangePercent":"1.340","weightedAvgPrice":"0.00129800","prevClosePrice":"0.00127600","lastPrice":"0.00128600","lastQty":"0.90000000","bidPrice":"0.00128700","bidQty":"45.50000000","askPrice":"0.00129000","askQty":"354.40000000","openPrice":"0.00126900","highPrice":"0.00131600","lowPrice":"0.00126700","volume":"5090.00000000","quoteVolume":"6.60683920","openTime":1711203643004,"closeTime":1711290043004,"firstId":5437599,"lastId":5437748,"count":150}]' Local $aCryptos = _JSON_Parse($sJSON) Local $mCurrency For $i = 0 To UBound($aCryptos) - 1 $mCurrency = $aCryptos[$i] If Number($mCurrency['priceChangePercent']) > 0 Then _ArrayAdd($aGainers, $mCurrency['symbol'] & '|' & $mCurrency['priceChangePercent']) EndIf Next _ArrayDisplay($aGainers)1 point
-
Should be easy as this is invalid syntax as stated by the error! Opening with a square bracket is wrong.1 point
-
AutoItHelp v3.3.16.1 with external CSS loading
donnyh13 reacted to argumentum for a topic
The CHM testbed is in v0.0.0.3 now and explains/shows what goes on when the "X-UA-Compatible" declares something, and what actually got done in the browser. Nicer looking too. It has checkmarks ( ✔ ) instead of the plus ( + ) signs for when something is functional ( very important )1 point -
AutoItHelp v3.3.16.1 with external CSS loading
donnyh13 reacted to argumentum for a topic
>ex would vary with font size, Yes. >which could cause unexpected results? No idea. For what I read not all fonts are well behaved either. So maybe ?. If the help file worked well ( aesthetically speaking ) in WinXP, that would be grand. If Win7 is the minimum, then that's that. The idea is to make it look as good as possible for as far back as possible. 8k PC monitor are the next thing. Have to keep that in mind to make the chm future proof. But for now I have to go do the dailys. >I also tend to over-think things Same here. 😅1 point -
Slideshow UDF
van_renier reacted to Andreik for a topic
@van_renier Added keys support to change slides - first post updated. Two more properties are available: EnableKeys (True or False) and Keys (a map with two mandatory keys Prev/Next) and a new function that process key events _GUICtrlSlideshow_KeyEvent().Here is an example: #include <SlideshowEx.au3> Global $avImage[4] = [ _ 'https://lh5.googleusercontent.com/p/AF1QipM3jIOsqrISfcKwgYLYF8-9DyAzQiUyWmB35nBj=w540-h312-n-k-no', _ 'https://lh5.googleusercontent.com/p/AF1QipMPb5fGtzZz2ZJFd20CV2trNzmxNOYLv4abJSfi=w540-h312-n-k-no', _ 'https://lh5.googleusercontent.com/p/AF1QipPLOXRwTpKbFxNNLTmiLrIJlG_H3h4VU6HShLwf=w540-h312-n-k-no', _ 'https://lh5.googleusercontent.com/p/AF1QipPNiwx1lGPxcHJzKTMRl5Cyr1SOjS05yHbif8BE=w540-h312-n-k-no' _ ] Global $asCaptions[4] = ['Pico do Fogo', 'Praia da Chave', 'Buracona - Blue Eye Cave', 'Deserto de Viana'] Global $mKeys[] ; Check _IsPressed() in help file for more virtual key codes $mKeys['Prev'] = '25' ; Left arrow button $mKeys['Next'] = '27' ; Right arrow button Global $mOptions[] $mOptions['ShowSlides'] = True $mOptions['ShowCaptions'] = True $mOptions['Captions'] = $asCaptions $mOptions['EnableKeys'] = True $mOptions['Keys'] = $mKeys Global $sTitle = 'Cape Verde' Global $sText = 'Cape Verde or Cabo Verde, officially the Republic of Cabo Verde, is an archipelago and island country of West Africa in the central Atlantic Ocean, ' & _ 'consisting of ten volcanic islands with a combined land area of about 4,033 square kilometres (1,557 sq mi). These islands lie between 600 and 850 kilometres ' & _ '(320 and 460 nautical miles) west of Cap-Vert, the westernmost point of continental Africa. The Cape Verde islands form part of the Macaronesia ecoregion, ' & _ 'along with the Azores, the Canary Islands, Madeira, and the Savage Isles.' Global $sExtraText = "Cape Verde's official language is Portuguese. The recognized national language is Cape Verdean Creole, which is spoken by the vast " & _ "majority of the population. As of the 2021 census the most populated islands were Santiago, where the capital Praia is located (269,370), São Vicente (74,016), " & _ "Santo Antão (36,632), Fogo (33,519) and Sal (33,347). The largest cities are Praia (137,868), Mindelo (69,013), Espargos (24,500) and Assomada (21,297)." Global $sCopyright = 'Sources for pictures and data are from google.com and wikipedia.com' Global $hGUI, $cTitle, $cText, $cExtra, $cCopyright, $mSlideshow _GDIPlus_Startup() $hGUI = GUICreate('Slideshow', 870, 450) $cTitle = GUICtrlCreateLabel($sTitle, 10, 10, 300, 60) $cText = GUICtrlCreateLabel($sText, 10, 90, 300, 240) $cExtra = GUICtrlCreateLabel($sExtraText, 10, 330, 850, 80) $cCopyright = GUICtrlCreateLabel($sCopyright, 10, 420, 850, 20) $mSlideshow = _GUICtrlSlideshow_Create($hGUI, 320, 10, 540, 312, $avImage, $mOptions) GUICtrlSetFont($cTitle, 35, 600, 0, 'Segoe UI') GUICtrlSetFont($cText, 11, 500, 0, 'Segoe UI') GUICtrlSetFont($cExtra, 11, 500, 0, 'Segoe UI') GUICtrlSetFont($cCopyright, 11, 500, 2, 'Segoe UI') GUICtrlSetColor($cTitle, 0x000060) GUICtrlSetColor($cCopyright, 0x800000) GUISetState(@SW_SHOW, $hGUI) While True _GUICtrlSlideshow_KeyEvent($mSlideshow) If _GUICtrlSlideshow_ButtonEvent($mSlideshow, $SLIDESHOW_PREV_BTN) Then _GUICtrlSlideshow_ShowSlide($mSlideshow, $BTN_EVENT_PREV) If _GUICtrlSlideshow_ButtonEvent($mSlideshow, $SLIDESHOW_NEXT_BTN) Then _GUICtrlSlideshow_ShowSlide($mSlideshow, $BTN_EVENT_NEXT) Switch GUIGetMsg() Case -3 ExitLoop EndSwitch WEnd _GUICtrlSlideshow_Delete($mSlideshow) _GDIPlus_Shutdown()1 point -
Hi, some random DoS attacks ongoing at the mo. Server is auto banning, but maybe some outages. Thanks, Jos, for letting me know,1 point