with dialog plugin 1.19 this works:

local sTitle = "Untitled - Notepad"
local sApp = "notepad.exe"
local sAppExe = "=notepad"
local sctrlClass = "c=Edit"

if (not visiblewindow(sAppExe)) do
 do(sApp)
 wait.for(500)
endif

local hHan = win.childhandlelist(sTitle, sctrlClass)
win.debug(hHan)

win.debug("handle to edit control on notepad: ", hHan)

;uses SendMessageTimeout with WM_GETTEXT
win.debug("Text in " ++ sApp ++ " edit control: " ++ ;;+
dialog.get_value(hHan))  

;uses SendMessageTimeout with WM_SETTEXT
dialog.set_value(hHan, "qqqqqqqqqqqqqqqqq") ;; uses WM_SETTEXT

win.debug("Text in " ++ sApp ++ " edit control: " ++ ;;+
dialog.get_value(hHan))

;notepad now in strange state, e.g. you can close it and it won't ask 
;to save, doesn't appear to know it's document is changed.

quit

When sent to an edit control, get_value and _set_value don't use
e.g OpenProcess, VirtualAllocEx, SendMessageTimeout, ReadProcessMemory. Very 
curious, as a pointer is getting sent across process boundaries and working.

If I do OpenProcess, VirtualAllocEx, SendMessageTimeout, the last
fails and sets last error to "access denied").

Bottom line: I'm gonna have to go through dialog get/set services control by 
control, to figure out what works and what doesn't.

I remember Sheri saying either getting or setting font didn't work on out of 
process controls.  If anyone else has had experience of any other out of 
process controls not working, let me know.





Reply via email to