I'm trying to use GT Text as an OCR screen-reader.
I downloaded it from here:
http://www.softocr.com/
In the same file - I've added a script that works when I use WinTitle as text:
Code: Select all
SendMessage, 0x111, 33031, 0, , New - GT Text
Code: Select all
SendMessage, 0x111, 33031, 0, , ahk_pid %GTAppPID%
Could someone please explain why?
This works:
Code: Select all
#SingleInstance force
#Persistent
SetBatchLines -1
#NoEnv
SetWorkingDir %A_ScriptDir%
DetectHiddenWindows On
SetTitleMatchMode, 2
clipboard =
;ahk_class Afx:00400000:b:00010003:00000006:007D04BF
Run, GT.exe, %A_ScriptDir%, Hide, GTAppPID
;Hide doesn't work - can't work out why
WinWait, New - GT Text
WinHide, New - GT Text
Sleep, 100
;Click capture from screen button - and wait for response
SendMessage, 0x111, 33031, 0, , New - GT Text
ClipWait, 60
;Close the application
PostMessage, 0x112, 0xF060,,, New - GT Text
ExitApp
This Does not work:
Code: Select all
#SingleInstance force
#Persistent
SetBatchLines -1
#NoEnv
SetWorkingDir %A_ScriptDir%
DetectHiddenWindows On
SetTitleMatchMode, 2
clipboard =
;ahk_class Afx:00400000:b:00010003:00000006:007D04BF
Run, GT.exe, %A_ScriptDir%, Hide, GTAppPID
;Hide doesn't work - can't work out why
WinWait, ahk_pid %GTAppPID%
WinHide, ahk_pid %GTAppPID%
Sleep, 100
;Click capture from screen button - and wait for response
SendMessage, 0x111, 33031, 0, , ahk_pid %GTAppPID%
ClipWait, 60
;Close the application
PostMessage, 0x112, 0xF060,,, ahk_pid %GTAppPID%
ExitApp