Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/21/2021 in all areas

  1. @serkan, Simple explaination of Danp2's script: #include <InetConstants.au3> #include <StringConstants.au3> #include <Array.au3> Local $sHTML = BinaryToString(InetRead("https://covid19asi.saglik.gov.tr/", $INET_FORCERELOAD)) ;Grab the websites HTML and put it all inside of a string variable Local $aMatch = StringRegExp($sHTML, "(?:var asiyapilankisisayisi = )(.*);", $STR_REGEXPARRAYMATCH) ;Using RegEx patterns, search through the string and grab the number you need _ArrayDisplay($aMatch) Now if you don't want to learn RegEx (I can't even comprehend how insane some of them are), Danp2 suggest you use his Webdriver UDF (User Defined Function) in his signature. It is a super useful and simple tool to navigate and/or grab information from Chrome or Edge browser. If you want to learn and not just get, click the links in @Danp2's signature and read up. 😃 👍
    1 point
  2. Yes it works thanks. But my goal is to learn, not to be ready.
    1 point
  3. Thanks! I updated my previous post with a commented description of what the jq filter does just in case anyone else, that comes across this topic, may be interested in jq and how it can be used to process JSON.
    1 point
  4. serkan, Welcome to the AutoIt forums. From what kind of application are you trying to read these numbers? Does the AutoIt Window Info tool offer any indications of the type of control which holds them? Perhaps a screenshot of the app would help. Please help us to help you. M23
    1 point
  5. Try to disable Windows Aero theme. If it helps then add this to your controls (to disable Windows theme on each control in your GUI): DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($ctrl_id), "wstr", "", "wstr", "")
    1 point
  6. MostafaTaha, Take a look here - all written in AutoIt: M23
    1 point
  7. pixelsearch

    LTR input in RTL gui

    A simple way to do it : #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $hGui = GUICreate("", 260, 100, -1, -1, -1, BitOr($WS_EX_LAYOUTRTL, $WS_EX_NOINHERITLAYOUT)) GUICtrlCreateLabel("Username", 15, 15, 80, 20, $SS_RIGHT) $id_Username = GUICtrlCreateInput("", 80, 10, 100, 20) ; LTR ; $id_Username = GUICtrlCreateInput("", 80, 10, 100, 20, BitOr($ES_RIGHT, $ES_AUTOHSCROLL)) ; RTL $id_OK = GUICtrlCreateButton("OK", 190, 10, 60, 50) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $id_OK GUIDelete($hGui) ExitLoop EndSwitch WEnd Edit: added syntax for both kind of Input controls (LTR or RTL), also added $SS_RIGHT for the label control.
    1 point
  8. I feel a bit overwhelemed by your enthusiasm! Thanks everybody! @Nine: Works like a charm! Damn fast as well. I realised by now that the image-name is also listed as "External ID" (easy to see, once you kow about the json plugin for notepad++ ;-)) . So I retreive the image name directly, and skip the line $sContent = StringRegExp(StringRegExp($aFile[$i],'"Labeled Data":"([^"]+)',1)[0],'(?i)([^-]*?\.jpg)',1)[0] This brings it down to 0,5s. 👍 One comment/question remains: As mentioned, the input file is only a trial, dealing with 500 images. The final file will deal with more than 20.000 images, so 40 times larger. So I might go back to reading one line at the time: using "FileReadLine". Does that make sense? @junkew: I agree on your "target picture"- comment. But it wasn't so easy to understand it myself: Only 1-2 days ago, I realised that one can look at json-files in a structured way (web browser) - giving a much better understanding of the file structure. The notepad-pluggin sure comes in handy. Haven't used powershell yet, but reading about it on the web... possibly an even better tool than autoit (for this task). I also found https://pandas.pydata.org . But I will stick to autoit for now, since the task is basically done. @seadoggie01: I too started using the json.au3 yesterday evening, but it seemed rather slow, yes. @TheXman: Nice! Very fast, too! Once again: Thank you everybody! Your skrips make it look so easy.... 😉
    1 point
  9. Hello, perhaps you can solve your issue by using the opposite approach: "Everything forbidden except ...". Search for "white listing (Microsoft Applocker) and Code Integrity (WDAC)
    1 point
  10. shai, That works: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; Create GUI $hGUI = GUICreate("", 260, 100, -1, -1, BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_LAYOUTRTL) GUICtrlCreateLabel("username:", 10, 15, 80, 20) $cOK = GUICtrlCreateButton("OK", 190, 10, 60, 50) GUISetState() ; Create child to hold input $hChild = GUICreate("", 80, 20, 80, 20, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $cUsername = GUICtrlCreateInput("", 0, 0, 80, 20) ; But do not activate GUISetState(@SW_SHOWNOACTIVATE, $hChild) ; Prevent child stealing active state GUIRegisterMsg($WM_NCACTIVATE, "_WM_NCACTIVATE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $cOK GUIDelete($hChild) GUIDelete($hGUI) ExitLoop EndSwitch WEnd Func _WM_NCACTIVATE($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam, $lParam Return 1 EndFunc ;==>_WM_NCACTIVATE But it is a bit more complicated than I thought. M23
    1 point
×
×
  • Create New...