找回密码
 加入
搜索
查看: 1774|回复: 4

[AU3基础] 想要把putty視窗縮到工作列最小 @SW_MINIMIZE

[复制链接]
发表于 2017-1-6 08:51:44 | 显示全部楼层 |阅读模式
想請問以下這一段為什麼沒有辦法視窗縮到最小啊...
        $user = 123
        $password = 123
        $host ="192.168.1.1"
        $port ="22"
        $puty_exe = "putty.exe"   ; putty salve local folder script
        $command = Run(@comspec & " /C "&$puty_exe&" -ssh -l "&$user&" "&$host&" p "&$port&" -pw "&$password,@ScriptDir, @SW_MINIMIZE, 1)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2017-1-6 10:56:06 | 显示全部楼层
本帖最后由 h20040606 于 2017-1-6 10:57 编辑

回复 1# ipmitool


    $user = 123
$password = 123
$host = "192.168.1.1"
$port = "22"
$puty_exe = "putty.exe" ; putty salve local folder script
$command = Run($puty_exe & " -ssh -l " & $user & " " & $host & " p " & $port & " -pw " & $password, @ScriptDir)
$hWnd=""
While $hWnd = ""
        $win_list = WinList()
        For $i = 1 To $win_list[0][0]
                If  WinGetProcess($win_list[$i][1]) = $command Then
                        $hWnd = $win_list[$i][1]
                        ExitLoop
                EndIf
        Next
        Sleep(100)
WEnd
WinSetState($hWnd, "", @SW_MINIMIZE)
发表于 2017-1-6 10:58:43 | 显示全部楼层
直接run,循环获得窗口句柄,就可以了
 楼主| 发表于 2017-1-6 13:26:56 | 显示全部楼层
本帖最后由 ipmitool 于 2017-1-6 13:30 编辑

回复 3# h20040606


    您好, 請問沒有辦法一執行就直接是縮下去的嗎?
    因為不想讓人有感覺視窗跳出來...拜託了!
发表于 2017-1-6 20:09:59 | 显示全部楼层
直接:
    $user = 123
$password = 123
$host = "192.168.1.1"
$port = "22"
$puty_exe = "putty.exe" ; putty salve local folder script
$command = Run($puty_exe & " -ssh -l " & $user & " " & $host & " p " & $port & " -pw " & $password, @ScriptDir,@SW_MINIMIZE)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-26 15:57 , Processed in 0.081768 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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