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

[系统综合] AU3 可以让 CUI 和 GUI 共存吗?或者说有办法共存吗?

[复制链接]
发表于 2013-6-11 17:21:10 | 显示全部楼层 |阅读模式
如题,话说是不可以的。但是有什么办法可以让这两个共存呢?

做了一个小程序、窗体的,但是想要在 cmd 下 -v 显示版本和来源
发表于 2013-6-11 19:11:34 | 显示全部楼层

#AutoIt3Wrapper_Change2CUI=Y       编译为cui
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Label1 = GUICtrlCreateLabel("Label1", 48, 64, 204, 57)
$Button1 = GUICtrlCreateButton("Button1", 296, 80, 81, 33)

If $CmdLine[0] = 0 Then
        
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

Else
        If $CmdLine[1] = "-v" Then
                ConsoleWrite("版本 v0.0.1")
        Else
                ConsoleWrite("参数错误")
        EndIf
EndIf
 楼主| 发表于 2013-6-12 03:04:23 | 显示全部楼层
回复 2# veket_linux


    大师、不行啊。你这个的 CUI 不能运行的。在 CMD 操作了之后木有反应的说。。
发表于 2013-6-13 08:48:55 | 显示全部楼层
回复 3# babytomas


    汗~请把第一个行加上注释:
#AutoIt3Wrapper_Change2CUI=Y    ; 编译为cui
 楼主| 发表于 2013-6-13 18:16:58 | 显示全部楼层
回复 4# haijie1223


    ,果然是高手、一看就发现了。还在头疼啥原因呢,这就去弄~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-17 18:58 , Processed in 0.080568 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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