回复 6# xxoojoeooxx
可是我用Local $foo = Run(@ComSpec & " /c " & 'for /f "tokens=2" %i in (''arp -a^|findstr :'') do @echo %i', @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $line
ProcessWaitClose($foo)
$line = StdoutRead($foo)
Send("{"& $line &"}")
却得不到IP地址,又是为何?
用你上面的Local $foo = Run(@ComSpec & " /c " & 'for /f "tokens=2" %i in (''arp -a^|findstr :'') do @echo %i', @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $line
ProcessWaitClose($foo)
$line = StdoutRead($foo)
;Send("{"& $line &"}")
$Title=WinGetTitle("[ACTIVE]")
ControlSend($Title, "", "[CLASSNN:"&ControlGetFocus($Title)&"]",$line )
却是OK的,还有我感觉ControlSend命令运行结束后好像会自动切换到下个“窗口上键盘焦点所在的控件上”,不知为何? |