telppa / PaddleOCR-AutoHotkey

PaddleOCR AutoHotkey Version. PaddleOCR AHK 版。
141 stars 18 forks source link

AHK v2 support? #3

Open jaredcat opened 2 years ago

jaredcat commented 2 years ago

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

davidWeiZhou commented 1 year ago

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

telppa commented 1 year ago

sorry, no plan.

valuex commented 8 months ago

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)
    ; }
thqby commented 7 months ago

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

XyMushi commented 3 months ago

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.

Qriist commented 3 months ago

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

iseahound commented 3 months ago

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: @.***>