|
回复 3# 的帖子
SetSelection可以解决你的问题吗?
Sub SetSelection_Example()
'The following example uses the SetSelection method to mark a selection
'of text in an edit box (the second character to the fifth character
'inclusive). The example then chooses Copy from a context menu to copy the
'selected text. Then it chooses Paste in the context menu of a second
'edit box to paste the selected text into the second edit box.
Dialog("Common Controls").WinEdit("Position").SetSelection 1, 4
Dialog("Common Controls").WinEdit("Position").Click 14, 7, 1
Dialog("Common Controls").WinEdit("Position").WinMenu("ContextMenu").Select "Copy"
Dialog("Common Controls").WinEdit("Offset").Click 18, 7, 1
Dialog("Common Controls").WinEdit("Offset").WinMenu("ContextMenu").Select "Paste"
End Sub |
|