找回密码
 加入
搜索
查看: 1246|回复: 1

关于引用的问题,哪个给看下.............

[复制链接]
发表于 2009-2-7 18:37:04 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
$mstscip = GUICtrlCreateLabel("您要登陆的远程IP:", 24, 24, 120, 30)
$Input1 = GUICtrlCreateInput("", 136, 24, 241, 21)
$Button1 = GUICtrlCreateButton("连接", 48, 104, 113, 57, 0)
$Button2 = GUICtrlCreateButton("Button2", 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
                        Run("mstsc.exe /admin /v:",&$mstscip);这里有问题不能用输入的数据.
                        Exit
                Case $Button2
                        Exit
        EndSwitch
WEnd

[ 本帖最后由 cls822001 于 2009-2-7 19:07 编辑 ]
 楼主| 发表于 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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-16 13:10 , Processed in 0.070700 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表