From the nice code of RASHAD
http://forums.purebasic.com/english/vie ... 59#p524088
Is it possible to write with the same style of function (Obviously if the field is writable) ?
Code: Select all
Procedure TextFromWindowPosition(*Name.string, *Value.string)
GetCursorPos_(@p)
If AccessibleObjectFromPoint(p\y<<32|p\x,@*pIAcc,@vt)=#S_OK
*Name\s=""
If *pIAcc\get_accName(vt, @pName) = #S_OK
len = SysStringLen_(pName)
*Name\s = Space(len)
WideCharToMultiByte_(#CP_ACP, 0,pName, -1, @*Name\s, len, 0, 0)
*Name\s = PeekS(@*Name\s, len, #PB_UTF8)
SysFreeString_(pName)
EndIf
*Value\s=""
*pIAcc\Release()
EndIf
ProcedureReturn #True
EndProcedure
Code: Select all
*Name\s = PeekS(@*Name\s, len, #PB_UTF8)
Code: Select all
PokeS(@*Name\s, "Kcc", 4, #PB_UTF8)
Code: Select all
*pIAcc\put_accName
*pIAcc\put_accValue