找回密码
 加入
搜索
查看: 1811|回复: 2

[AU3基础] 请问 怎么让下边GUI内的按钮分别打开指定网址

[复制链接]
发表于 2011-2-16 11:12:06 | 显示全部楼层 |阅读模式
请问 怎么让下边GUI内的按钮分别打开指定网址

#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $tab, $tab0, $tabbt1, $tabbt2, $tabbt3, $tabbt4, $tabbt5, $tabbt6, $tabbt7, $tabbt8, $tabbt9, $tabbt10, $tabbt11, $tabbt12
    Local  $msg

    GUICreate("My GUI Tab", 160, 305)
    GUISetBkColor(0x0eE0FeFF)
    GUISetFont(9, 300)
    $tab = GUICtrlCreateTab(1, 1, 160,305,$WS_DLGFRAME)
    $tab0 = GUICtrlCreateTabItem("连接")
        GUICtrlCreateGroup("网址",12,35,140,262,$WS_EX_CLIENTEDGE )
    GUICtrlCreateLabel("la9999999999999999el0", 20, 60, 90, 20)
        GUICtrlCreateLabel("label0", 20, 80, 50, 20)
        GUICtrlCreateLabel("label0", 20, 100, 50, 20)
        GUICtrlCreateLabel("label0", 20, 120, 50, 20)
        GUICtrlCreateLabel("label0", 20, 140, 50, 20)
        GUICtrlCreateLabel("label0", 20, 160, 50, 20)
        GUICtrlCreateLabel("label0", 20, 180, 50, 20)
        GUICtrlCreateLabel("label0", 20, 200, 50, 20)
        GUICtrlCreateLabel("label0", 20, 220, 50, 20)
        GUICtrlCreateLabel("label0", 20, 240, 50, 20)
        GUICtrlCreateLabel("label0", 20, 260, 50, 20)
        GUICtrlCreateLabel("label0", 20, 280, 50, 20)
        ;..................................................................
    $tabbt1 = GUICtrlCreateButton("OK0", 105, 55, 35, 20)
        $tabbt2 = GUICtrlCreateButton("OK0", 105, 75, 35, 20)
        $tabbt3 = GUICtrlCreateButton("OK0", 105, 95, 35, 20)
        $tabbt4= GUICtrlCreateButton("OK0", 105, 115, 35, 20)
        $tabbt5 = GUICtrlCreateButton("OK0", 105, 135, 35, 20)
        $tabbt6 = GUICtrlCreateButton("OK0", 105, 155, 35, 20)
        $tabbt7 = GUICtrlCreateButton("OK0", 105, 175, 35, 20)
        $tabbt8 = GUICtrlCreateButton("OK0", 105, 195, 35, 20)
        $tabbt9 = GUICtrlCreateButton("OK0", 105, 215, 35, 20)
        $tabbt10 = GUICtrlCreateButton("OK0", 105, 235, 35, 20)
        $tabbt11 = GUICtrlCreateButton("OK0", 105, 255, 35, 20)
        $tabbt12 = GUICtrlCreateButton("OK0", 105, 275, 35, 20)
          
       GUISetState()

  
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
        If $msg = $tab Then
         
            WinSetTitle("My GUI Tab", "", "My GUI Tab" & GUICtrlRead($tab))
        EndIf
    WEnd
EndFunc
发表于 2011-2-16 11:37:56 | 显示全部楼层
If $msg = $tabbt1 Then ShellExecute('www.autoitx.com')

将这行代码加到你的循环里试试!
 楼主| 发表于 2011-2-16 13:08:15 | 显示全部楼层
谢谢版主  问题解决
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-21 12:37 , Processed in 0.071170 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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