in your case you will have to keep using WindowText wt.Init(w), wt.CaptureToString because its a custom progress bar in .net so get wintext wont work
try this
try this
int wMain=win("" "*.Window.*" "KeePass")
if(!wMain) ret;
int w=child("" "*.Window.*" wMain 0x0 "wfName=m_pbQuality")
if(!w) ret;
WindowText wt.Init(w)
;g1
'VDDY ;; Space (40) (40) Enter
wait 50
str s=wt.CaptureToString
str pattern= "\d+"
str ss
findrx(s pattern 0 1 ss)
int x = val(ss)
if(x < 52) goto g1
ret