Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/28/2022 in all areas

  1. mmm... not sure anymore why I made RUN the default. Have changed that to Compile as this is the "Compile with options" task in the current Beta.
    2 points
  2. that should not the the cause unless there's a bug in the stripper but even then, you can declare #Au3Stripper_Off and #Au3Stripper_On to exclude an area of your code from processing.
    1 point
  3. #include <Date.au3> _Date_Time_SetFileTime ( $hFile, $tCreateTime, $tLastAccess, $tLastWrite )
    1 point
  4. I use group policy for popups, see Allow pop-up windows on specific sites (admx.help) , example: HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge\PopupsAllowedForUrls 1 = [*.]domain1.com 2 = [*.]domain2.com
    1 point
  5. @Danp2 Thanks for the quick reply. Your comment about InetRead failing due to security protocols got me thinking, so I checked our web content filter. Guess what...both github.com and msedgedriver.azureedge.net were being blocked for the standard user, and not for the admin user. THANK YOU!!!
    1 point
  6. Hello @g0gcd What I would do is to append your image to an image with a similar text pattern so that the OCR engine can get a better result. So you will end up with a joined image like this one: then process it with the OCR. Test Code: #include <ScreenCapture.au3> #include <GDIPlus.au3> #include "..\UWPOCR.au3" _Example() Func _Example() _GDIPlus_Startup() ;hImage/hBitmap GDI Local $hTimer = TimerInit() Local $sImageFilePath = @ScriptDir & "\JoinedImage.jpg" Local $sImageTIM2FilePath = @ScriptDir & "\TIM2.bmp" Local $sText = "0123456789" Local Const $iW = 270, $iH = 40 Local $hImageToProcess = _GDIPlus_ImageLoadFromFile($sImageTIM2FilePath) Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) ;create an empty bitmap Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) ;get the graphics context of the bitmap _GDIPlus_GraphicsSetSmoothingMode($hBmpCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsClear($hBmpCtxt, 0xFFFFFFFF) ;clear bitmap with color white _GDIPlus_GraphicsDrawString($hBmpCtxt, $sText, 0, 0, "Arial", 18) ;draw some text to the bitmap _GDIPlus_GraphicsDrawImage($hBmpCtxt, $hImageToProcess,140, -16) _GDIPlus_ImageSaveToFile($hBitmap, $sImageFilePath) ;save bitmap to disk Local $sOCRTextResult = _UWPOCR_GetText($sImageFilePath) MsgBox(0, "Time Elapsed: " & TimerDiff($hTimer),StringStripWS(StringReplace( $sOCRTextResult,$sText,""), $STR_STRIPALL)) _GDIPlus_GraphicsDispose($hBmpCtxt) _GDIPlus_ImageDispose($hImageToProcess) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() EndFunc ;==>_Example Saludos
    1 point
  7. Try “fa-IR”? Also check if it is supported by your OS and install additional language pack if required (and available).
    1 point
  8. kor

    If Then Else single line?

    I'm not at my work computer to test things but I've been wondering something about If then else statements. I know you can do the following If $i > 0 Then _DoSomething() And that is a valid single line statement. I'm wondering if you can do the same thing with Else and ElseIf statements If $i > 0 Then _DoSomething() Else _SomethingElse() Or If $i > 0 Then _DoSomething() ElseIf $n > 0 Then _SomethingElse() Are any of those valid code or are EndIf statements required if you have Else/ElseIf statements?
    1 point
×
×
  • Create New...