PaddleOCR-AutoHotkey icon indicating copy to clipboard operation
PaddleOCR-AutoHotkey copied to clipboard

AHK v2 support?

Open jaredcat opened this issue 2 years ago • 7 comments

My script is written to run with V2. Any plans to add a v2 supported version?

jaredcat avatar Nov 05 '22 23:11 jaredcat

我也需要AHK V2.0的,现在都2.0正式版了,希望作者能整一下2.0的,感谢万分!

davidWeiZhou avatar Dec 27 '22 03:12 davidWeiZhou

sorry, no plan.

telppa avatar Jan 05 '23 02:01 telppa

I converted the lastest version to Autohotkey V2. Here you go: https://gist.github.com/valuex/9c2f68eb33953b4a016985f36360f7dd For this part, I don't understand what it means, so I just comment it out. It works right so far.

    ; if (get_all_info)
    ; {
    ;     wrongChars := ",score:-" . nan(ind) . ",range"
    ;     rightChars := ",score:-1,range"
    ;     str := StrReplace(str, wrongChars, rightChars)
    ;     ; 修复 str 为空报错的问题
    ;     return str:="" ? "" : JSON.Load(str)
    ; }

valuex avatar Feb 17 '24 13:02 valuex

https://github.com/thqby/ahk2_lib/tree/master/RapidOcr

thqby avatar Mar 20 '24 12:03 thqby

I converted the lastest version to Autohotkey V2. Here you go: https://gist.github.com/valuex/9c2f68eb33953b4a016985f36360f7dd

I’m also trying to transition from v1 to v2, but I'm struggling a lot due to unfamiliarity with the v2 syntax. My DLLCALL attempts keep failing. This has been a major hurdle for me.

XyMushi avatar Aug 11 '24 19:08 XyMushi

I’m also trying to transition from v1 to v2

Use the RapidOCR library. It's an updated v2 fork of Paddle. https://github.com/thqby/ahk2_lib/tree/master/RapidOcr

Qriist avatar Aug 11 '24 22:08 Qriist

You could use ImagePutEncodedBuffer to return an AutoHotkey buffer object with .ptr and .size properties which can be passed directly to ocr_from_binary. This function is expecting some kind of encoded format such as PNG which can cause unnecessary compression/decompression. In any case, this suggestion should simplify your code and hopefully make your code work on v2.

On Sun, Aug 11, 2024 at 18:37 Qriist @.***> wrote:

I’m also trying to transition from v1 to v2

Use the RapidOCR library. It's an update v2 fork of Paddle. https://github.com/thqby/ahk2_lib/tree/master/RapidOcr

— Reply to this email directly, view it on GitHub https://github.com/telppa/PaddleOCR-AutoHotkey/issues/3#issuecomment-2282911601, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKTTVAWWHZA6X7NQMTYZBLZQ7RUHAVCNFSM6AAAAAARYERDWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBSHEYTCNRQGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

iseahound avatar Aug 12 '24 04:08 iseahound