I'm working on an script that imports an screenshot, uses PaddleOCR to get the string & value, and then uses an loop to to display the output of each in an message box (for now.)
What I am struggling with is splitting the output into 2 fields," String" And "Value," as it stands it's "String value."
So far my 'working' code:
Code: Select all
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#SingleInstance Force
#InstallKeybdHook
#InstallMouseHook
#UseHook On
#Persistent
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
DetectHiddenWindows, On
ListLines Off
Process, Priority, , A
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SetWorkingDir %A_ScriptDir%
Global UserProfile
EnvGet, UserProfile, UserProfile
#Include PaddleOCR\PaddleOCR.ahk
ret := PaddleOCR("DoDStats.png", {"get_all_info":1})
for k, v in ret
{
words := v.words ;
MsgBox,
(Ltrim
`t%words%
)
}
ESC::ExitApp