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

[网络通信] 如何点击控件打开Internet Explorer[已解决]

[复制链接]
发表于 2010-5-13 21:01:41 | 显示全部楼层 |阅读模式
本帖最后由 tianlong 于 2010-5-13 21:17 编辑

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate(" ", 301, 301, 192, 124)
$Button1 = GUICtrlCreateButton("打开主页", 72, 48, 153, 49)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

        EndSwitch
WEnd

请教高手怎么才能点击“打开主页”按钮后自动打开Internet Explorer?还有怎么才能设定打开指定的网站如:http://www.autoitx.com 希望高手附上代码谢谢!

评分

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

查看全部评分

发表于 2010-5-13 21:12:26 | 显示全部楼层
GUICreate(" ", 301, 301)
$Button1 = GUICtrlCreateButton("打开主页", 72, 48, 153, 49)
GUISetState()
While 1
        Switch GUIGetMsg()
                Case -3
                        Exit
                Case $Button1
                        Run(@ProgramFilesDir & '\Internet Explorer\IEXPLORE.EXE http://www.autoitx.com/')
        EndSwitch
WEnd
 楼主| 发表于 2010-5-13 21:16:41 | 显示全部楼层
afan哥好厉害,谢谢!
发表于 2010-5-16 00:14:34 | 显示全部楼层
正是自己想要学习的知识点啊,感谢分享!
发表于 2010-6-8 13:47:37 | 显示全部楼层
收藏了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-11 05:40 , Processed in 0.071985 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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