Window Spy will say at one minute its Edit10, and the next, Edit15 (so far those are the only two names). I think this is changing as a result of a child-window popping up and closing, but that hasn't been consistent either.
According to Window Spy, the Client X and Y for these textboxes don't change, so I'm trying to get something useful for ControlSetText and ControlGetText (write to the textbox, and read it back for confirmation before moving onto to the next step).
I've looked at
Code: Select all
handle:= DllCall("WindowFromPoint", Int,x, Int,y)
Code: Select all
EditPath := DllCall("WindowFromPoint", Int,77, Int,102) ; EditPath is now either Edit10 or Edit15
EditFile := DllCall("WindowFromPoint", Int,77, Int,128) ; EditFile stays at Edit1
Code: Select all
SetTitleMatchMode, 1
{
EditPath := DllCall("WindowFromPoint", Int,77, Int,102)
EditFile := DllCall("WindowFromPoint", Int,77, Int,128)
Sleep 500
WinActivate, Render to File
Sleep 100
ControlSetText, EditPath, %reaperFolderName%, Render to File ; Set Path
Sleep 100
ControlSetText, EditFile, %reaperFilename%, Render to File ; Set Filename
Sleep 100
ControlGetText, bState, EditPath, Render to File
ControlGetText, cState, EditFile, Render to File
MsgBox, 48, %Version% - Line 71, % "EditPath: " EditPath "`nEditFile: " EditFile
if ((bState = reaperFolderName) && (cState = reaperFilename)) {
break
}
}
Can someone explain this to me? How do I use the coordinates of these textboxes in a more appropriate manner?
Thank you.