#Include <GuiEdit.au3>
Local $sTxtPath = @ScriptDir & '\tt.txt'
Local $sTxt = 'biuuifgsngosgoigio测试sffasg字符dsgsdg'
If Not FileExists($sTxtPath) Then FileWrite($sTxtPath, $sTxt)
Local $str = FileRead($sTxtPath)
ShellExecute($sTxtPath)
;Local $sClip = ClipGet()
Local $sClip = '测试'
Local $hW = WinWaitActive('tt - ', $str)
Local $iStart = StringInStr($str, $sClip)
If Not $iStart Then Exit MsgBox(48, '无剪贴板内容', $sClip)
Local $hEdit = ControlGetHandle($hW, '', 'Edit1')
_GUICtrlEdit_SetSel($hEdit, $iStart - 1, $iStart + StringLen($sClip) - 1)
|