Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/24/2021 in all areas

  1. One of the most common causes of the Send() function not sending keys after switching to Windows 10 is because of Windows 10's enhanced security features. A non-elevated process cannot send keys to an elevated process. To see if that's the issue you're having, you can try one of the following: Add the #RequireAdmin directive to the top of your script. or If the script is compiled, right-click it and select the "Run As Admin" option On a side note when using WinWait or WinWaitActive, if you set a timeout, then you can gracefully exit/return if the windows does not appear or become active instead of your script waiting forever. For example: ;Wait up to 3 seconds for the window to appear If Not WinWait("Some title", "", 3) Then MsgBox($MB_ICONWARNING + $MB_TOPMOST, "WARNING", "Timed out waiting for some title.") Exit 1 EndIf
    3 points
  2. ; React on a button click Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) ConsoleWrite('+ Func WM_COMMAND(' & $hWnd & ', ' & $iMsg & ', ' & $wParam & ', ' & $lParam & ')' & @CRLF) ; <<<< add this Local $nNotifyCode = _WinAPI_HiWord($wParam) Local $iId = _WinAPI_LoWord($wParam) Local $hCtrl = $lParam If $iId <> 2 And $nNotifyCode = 0 Then ; Check for IDCANCEL - 2 ; Ownerdrawn buttons do not send a message when pressing ENTER ; So if IDOK - 1 comes up, now check for the control that has the current focus If $iId = 1 Then Local $hFocus = _WinAPI_GetFocus() Local $idControl = _WinAPI_GetDlgCtrlId($hFocus) PostButtonClick($hWnd, $idControl) Else ;~ MsgBox($MB_SYSTEMMODAL, "WM_COMMAND", "GUIHWnd" & @TAB & ":" & $hWnd & @CRLF & _ ; <<<< comment this out ...hope that shows why is not blocking or important for the example
    1 point
  3. Hey @careca, why don't you try to use the Binance API? It is pretty mature and full of features, this way you can get the quotes directly from the source. If so, maybe AutoIt is not the best tool for this. Take a look at this post about web requests: Binance get markets: https://api.binance.com/api/v3/exchangeInfo Get all the tickers: https://www.binance.com/api/v3/ticker/bookTicker The full API: https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md Good lucky
    1 point
  4. If you check the forum, there have been past discussions on this site. Suggest that you look into their API, which should be easier and more accurate than trying to scrape the data from the website.
    1 point
  5. wakillon

    Bitmap2AscII

    Bitmap2AscII use Lucida Console font with a size set to 8, so Windows 8/8.1 users need to change their notepad font and size for get a correct display. Image Rescale slider is only available when saving as image. A click on the "PreviewEdit" open AscII string in Notepad. You can save as Text, Html or Image (add the extension you want) Each setting change is immediately applied. Downloads available in the download section Hope you like it !
    1 point
  6. Try this: ;coded by UEZ 2011 #include <GUIConstantsEx.au3> #include <GDIPlus.au3> _GDIPlus_Startup() Global Const $STM_SETIMAGE = 0x0172 Global Const $hBmp = _GDIPlus_BitmapCreateFromMemory(InetRead("http://aut1.autoit-cdn.com/forum/public/style_images/master/logo_autoit.png"), True) ;to load an image from the net Global Const $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp) Global Const $iWidth = _GDIPlus_ImageGetWidth($hBitmap) Global Const $iHeight = _GDIPlus_ImageGetHeight($hBitmap) Global Const $hGUI = GUICreate("Display PNG Image in picture control", $iWidth, $iHeight) Global Const $idPic = GUICtrlCreatePic("", 0, 0, $iWidth, $iHeight) _WinAPI_DeleteObject(GUICtrlSendMsg($idPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp)) GUISetState() While True Switch GUIGetMsg() Case $idPic MsgBox(0, "Information", "PNG image was clicked") Case $GUI_EVENT_CLOSE _WinAPI_DeleteObject($hBmp) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() GUIDelete($hGUI) Exit EndSwitch WEnd Br, UEZ
    1 point
×
×
  • Create New...