浏览器嵌入GUI窗口实例

;===========================================================================

f1=http://www.autoahk.com
filename1=Browser SOFT

Gui,2: Add, Edit, w930 r1 vURL,%f1%
Gui,2: Add, Button, x5 y25  gBrB, <
Gui,2: Add, Button, x+1 y25 gBrF, >
Gui,2: Add, Button, x+6 yp w44 Default gA1, Go
;Gui,2: Add, ActiveX, xm w980 h640 vWB, Shell.Explorer
Gui,2: Add, ActiveX, xm w1080 h720 vWB, http://www.autoahk.com
ComObjConnect(WB, WB_events)    ;- Connect WB's events to the WB_events class object.
Gui,2: Show,,%filename1%
gosub,a1
return

a1:
Gui,2: Submit, NoHide
try {WB.Navigate(URL)
}catch e{
xxx:=e.Message
msgbox, 262208,ERROR,Error=`n%xxx%`n------------------------------------------`n
return
}
return

Brb:
try{WB.GoBack()
}catch e{
xxx:=e.Message
msgbox, 262208,ERROR,Error=`n%xxx%`n------------------------------------------`n
return
}
return

BrF:
try{WB.GoForward()
}catch e{
xxx:=e.Message
msgbox, 262208,ERROR,Error=`n%xxx%`n------------------------------------------`n
return
}
return

class WB_events
{
NavigateComplete2(wb, NewURL)
  {
  GuiControl,2:, URL, %NewURL%  ;- Update the URL edit control.
  }
}

2GuiClose:
ExitApp

 

给TA买糖
共{{data.count}}人
人已赞赏
AHKV1

从文本文件中删除首字母,无编程基础者慎入!!

2018-4-9 8:57:45

AHKV1

用一个脚本生成另一个脚本并运行

2018-4-9 21:50:46

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索