界面版按键精灵的使用【包含内置浏览器、打开程序的方法】

时间:2024-02-16 18:48:52

包含界面的脚本.....................................................自己拖拽包,根据这里的控件名命名,然后自己拖拽

 

\'打开九阴真经
Event Form1.btn1.Click
Call RunApp("C:\Program Files (x86)\游戏蜗牛\9yinjh\fxlaunch.exe")
End Event

\'打开WPS
Event Form1.btn2.Click
Call RunApp("C:\Users\macbook\AppData\Local\Kingsoft\WPS Office\ksolaunch.exe")
End Event
\'打开QQ
Event Form1.btn4.Click
Call RunApp("C:\Program Files (x86)\Tencent\QQ\Bin\QQScLauncher.exe")
End Event

\'打开百度,默认加载页面
Event Form1.Load \'加载事件
Form1.WebBrowser1.Url = "www.baidu.com"
End Event

\'按钮实现打开百度首页
Event Form1.btn3.Click
Form1.WebBrowser1.Url = "www.baidu.com"
Form1.btn3.Caption = "百度一下"
Form1.WebBrowser1.HtmlClick "tag:A&txt:百度一下"
End Event

\'标签事件
Event Form1.Label1.Click

End Event
\'打开博客园
Event Form1.Button1.Click
\'外部打开
\'Call Plugin.Web.Bind("WQM.exe")
\'Call Plugin.Web.Go("https://www.cnblogs.com/ciscolee/")
\'使用内部打开
Form1.WebBrowser1.Url = "https://www.cnblogs.com/ciscolee/"
Form1.Button1.Caption = "博客园"
\'以下使用“网页按键精灵”网页分析功能查找元素特征串
Form1.WebBrowser1.HtmlClick "tag:A&txt:博客园"
End Event
\'结束打开博客园
Event Form1.WebBrowser1.DocumentComplete
\'网页加载完成,提示
Form1.Label1.Caption = "加载完成!!!!"
End Event