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

[AU3基础] [已解决]关于加入静默参数的问题...

  [复制链接]
发表于 2012-2-9 20:42:00 | 显示全部楼层 |阅读模式
本帖最后由 邪恶海盗 于 2012-2-10 12:43 编辑
While 1
 $nMsg = GUIGetMsg()
        Switch $nMsg
Case $GUI_EVENT_CLOSE
     Exit
Case $Button1
****
Case $Button2
****
Case $Button3
****
        EndSwitch
某一段代码,如何做到生成.exe后添加参数如/s和按键$Button1一样的效果???

$CmdLine[0] ;参数的数量
$CmdLine[1] ;第一个参数 (脚本名称后面)
$CmdLine[2] ;第二个参数等等
帮助里是这样写的,没看懂...

评分

参与人数 1金钱 +15 收起 理由
afan + 15 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 2012-2-9 21:18:30 | 显示全部楼层
If $CmdLine[0] > 0 And $CmdLine[1] = '/s' Then Exit _b1()

GUICreate('')
$ib = GUICtrlCreateButton('按钮1', 100, 100, 150, 25)

GUISetState()
While 1
        $msg = GUIGetMsg()
        Switch $msg
                Case -3
                        Exit
                Case $ib
                        _b1()
        EndSwitch
WEnd

Func _b1()
        MsgBox(0, '', '按钮1动作')
EndFunc   ;==>_b1
 楼主| 发表于 2012-2-10 12:42:09 | 显示全部楼层
回复 2# afan


    感谢,又学了一招,亲测可用....
发表于 2012-3-10 21:55:59 | 显示全部楼层
是啊|感谢版主。
发表于 2013-11-2 15:49:45 | 显示全部楼层
感谢版主奉献
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-28 19:22 , Processed in 0.088379 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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