|
楼主 |
发表于 2009-2-7 19:06:59
|
显示全部楼层
问题搞定
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 410, 168, 319, 214)
$Label1= GUICtrlCreateLabel("您要登陆的远程IP:", 24, 24, 120, 30)
$mstscip = GUICtrlCreateInput("", 136, 24, 241, 21)
$Button1 = GUICtrlCreateButton("连接", 48, 104, 113, 57, 0)
$Button2 = GUICtrlCreateButton("取消", 240, 104, 129, 57, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$ip=GUICtrlRead($mstscip)
Run(@ComSpec & " /c start mstsc /admin /v:" & $ip,"",0)
Exit
Case $Button2
Exit
EndSwitch
WEnd |
|