精易论坛

标题: EPL language 开发多页浏览器源码 [打印本页]

作者: stillness    时间: 2012-10-27 21:27
标题: EPL language 开发多页浏览器源码
本帖最后由 玲心韩雪 于 2012-10-28 09:36 编辑

EPL language 开发多页浏览器源码
  1. .DocVersion 2
  2. .Lib HtmlView
  3. .Lib iext3
  4. .Lib iext

  5. .Module FormModule1
  6. .ModuleVar IE, HTMLBrowser, , "0"
  7. .ModuleVar MainCaption, String

  8. .Sub _MainForm_AfterCreate

  9. 窗口布局 ()

  10. .Sub 窗口布局, , Export

  11. MainCaption = "Themyth Browser"
  12. SSL.Text = "百度一下,你就知道"
  13. MainForm.Caption = MainCaption
  14. MainForm.MinButton = True
  15. Browser1.Visible = False
  16. Browser1.Silence = Not (True)
  17. FstOneRun_CSH_Function ()
  18. IE [Tab.CurrentTab].SetFocus ()
  19. CSH_CDBT ()

  20. .Sub CSH_CDBT, , Export

  21. 主页A.Caption = "主页"
  22. 空白页A.Caption = "空白页"
  23. 搜索页A.Caption = "搜索页"

  24. .Sub FstOneRun_CSH_Function, , Export
  25. .LocalVar aa, HTMLBrowser

  26. Tab.AddTab ("", , , , )
  27. Tab.HideTab (0, True)
  28. CopyControl (Browser1, aa)
  29. AddElement (IE, aa)
  30. Tab.CurrentTab = GetAryElementCount (IE)
  31. IE [Tab.CurrentTab].Visible = True
  32. ' // IE [Tab.CurrentTab].ZOrder ()
  33. IE [Tab.CurrentTab].Execute (2)
  34. 同步显示WEB页 (Tab.CurrentTab)

  35. .Sub 同步显示WEB页, , Export
  36. .Arg XSSY, Integer
  37. .LocalVar CurLoopTime, Integer

  38. .Count (GetAryElementCount (IE), CurLoopTime)
  39.     .If (CurLoopTime <> XSSY)
  40.         IE [CurLoopTime].Visible = False
  41.         IE [CurLoopTime].ZOrder (2)
  42.     .else
  43.         IE [CurLoopTime].Visible = True
  44.         IE [CurLoopTime].ZOrder ()
  45.     .ife_end

  46. .CountNext ()

  47. .Sub 新建页面, , Export
  48. .Arg 地址, String, ByRef AllowEmpty
  49. .LocalVar aa, HTMLBrowser

  50. Tab.AddTab ("", , , , )
  51. Tab.HideTab (0, True)
  52. CopyControl (Browser1, aa)
  53. AddElement (IE, aa)
  54. Tab.CurrentTab = GetAryElementCount (IE)
  55. IE [Tab.CurrentTab].Visible = True
  56. IE [Tab.CurrentTab].ZOrder ()
  57. IE [Tab.CurrentTab].URL = 地址
  58. 同步显示WEB页 (Tab.CurrentTab)


  59. .Sub 跳转页面
  60. .Arg 地址, String, AllowEmpty
  61. .Arg 特殊, Boolean, AllowEmpty
  62. .Arg 内定, Integer, AllowEmpty
  63. .Arg 索引, Integer, AllowEmpty

  64. .If (IsEmpty (特殊) = True)
  65.     .If (特殊 <> True)
  66.         Tab.CurrentTab = 索引
  67.         IE [索引].Navigate (地址, , )
  68.         同步显示WEB页 (索引)
  69.     .else
  70.         跳转面页_Function (内定, 索引)
  71.     .ife_end

  72. .else
  73.     跳转面页_Function (内定, 索引)
  74. .ife_end


  75. .Sub 跳转面页_Function
  76. .Arg 内定, Integer
  77. .Arg 索引, Integer

  78. IE [索引].Execute (内定)
  79. Tab.CurrentTab = 索引
  80. 同步显示WEB页 (索引)

  81. .Sub _主页A_Click

  82. 新建页面 (GetTextKey (3, "SOFTWARE\Microsoft\Internet Explorer\Main\Start Page", ))
  83. ' Search Page

  84. .Sub _搜索页A_Click

  85. 新建页面 (GetTextKey (3, "SOFTWARE\Microsoft\Internet Explorer\Main\Search Page", ))

  86. .Sub _空白页A_Click

  87. ' //新建页面 (GetTextKey (3, "SOFTWARE\Microsoft\Internet Explorer\Main\Security Risk Page", ))
  88. 新建页面 ("about:inprivate")

  89. .Sub _Tab_HeadRightClick
  90. .Arg TabIndex, Integer

  91. PopupMenu (t12jinkninwi1no31123, , )

  92. .Sub _主页_Click

  93. 跳转页面 ("", True, 2, Tab.CurrentTab)

  94. .Sub _搜索页_Click

  95. 跳转页面 ("", True, 3, Tab.CurrentTab)

  96. .Sub _空白页_Click

  97. 跳转页面 ("about:inprivate", , , Tab.CurrentTab)


  98. .Sub _Tab_TabChange
  99. .LocalVar Temp, String

  100. .IfTrue (GetAryElementCount (IE) > 0)
  101.     同步显示WEB页 (Tab.CurrentTab)
  102.     _Browser1_CaptionChange ()
  103.     ' //Caption = MainCaption + " " + IE [Tab.CurrentTab].Caption
  104.     ' //SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_24, IE [Tab.CurrentTab].Caption), IE [Tab.CurrentTab].Caption)
  105. .if_end


  106. .Sub _当前页_Click
  107. .LocalVar 索引, Integer

  108. ' // 关闭面页 (Tab.CurrentTab, "about:inprivate")

  109. .IfTrue (Tab.CurrentTab > 0)
  110.     .If (Tab.GetTabCount () = 2)
  111.         _空白页_Click ()
  112.     .else
  113.         IE [Tab.CurrentTab].Destroy ()
  114.         RemoveElement (IE, Tab.CurrentTab, )
  115.         Tab.DeleteTab (Tab.CurrentTab)
  116.     .ife_end
  117.     同步显示WEB页 (Tab.CurrentTab)
  118. .if_end


  119. .Sub _全部页_Click
  120. .LocalVar s, Integer
  121. .LocalVar f

  122. .IfTrue (GetAryElementCount (IE) > 0)
  123.     .Count (GetAryElementCount (IE), s)
  124.         ' f = GetAryElementCount (IE)
  125.         ' f = f - s
  126.         .If (GetAryElementCount (IE) = 1)
  127.             跳转页面 ("about:inprivate", False, -1, Tab.CurrentTab)
  128.         .else
  129.             IE [s].Destroy ()
  130.             Tab.DeleteTab (s)
  131.             RemoveElement (IE, s, )
  132.         .ife_end
  133.         同步显示WEB页 (Tab.CurrentTab)

  134.     .CountNext ()
  135. .if_end


  136. .Sub _Browser1_StatusTextChange

  137. Statusbar.SetText (1, IE [Tab.CurrentTab].StatusText)

  138. .Sub _Browser1_BeforeNavigate, Boolean

  139. Return (Not (False))
  140. DZL.Text = IE [Tab.CurrentTab].URL
  141. Swap (IE [Tab.CurrentTab].URL)

  142. .Sub Swap, , Export
  143. .Arg UrlAdderss, String, , url地址
  144. .LocalVar ico, Bin, Static, "0"
  145. .LocalVar url, String, Static, "0"
  146. .LocalVar linseed, Bin, , "0"
  147. .LocalVar Sy, Integer
  148. .LocalVar Cs, Integer
  149. .LocalVar bni, Bin

  150. .For (1, GetAryElementCount (url), 1, Sy)
  151.     .IfTrue (url [Sy] = UrlAdderss)
  152.         AddElement (linseed, ico [Sy])
  153.         Cs = Cs + 1
  154.     .if_end

  155. .Next ()
  156. .If (Cs <> 0)
  157.     bni = Readehtmlico (CliocAdderss (UrlAdderss))
  158. .else
  159.     bni = linseed [1]
  160. .ife_end
  161. .If (bni <> {  })
  162.     htmlIco.Picture = bni
  163. .else
  164.     htmlIco.Picture = Icon
  165. .ife_end



  166. .Sub CliocAdderss, String, Export
  167. .Arg adderss, String
  168. .LocalVar a, String, , "0"
  169. .LocalVar c
  170. .LocalVar d, String

  171. a = SplitString (adderss, "/", )
  172. .Count (#MY_03, c)
  173.     .If (c < 2 And c > 0)
  174.         d = a [c] + "//"
  175.     .else
  176.         d = d + a [c] + "/"
  177.     .ife_end

  178. .CountNext ()
  179. .IfTrue (StrRight (d, 1) <> "/")
  180.     d = d + "/"
  181. .if_end
  182. d = d + "favicon.ico"
  183. Return (d)


  184. .Sub Readehtmlico, Bin, Export
  185. .Arg call, String, AllowEmpty
  186. .Arg adder, String, AllowEmpty
  187. .LocalVar oject, Object
  188. .LocalVar bin, Bin

  189. .If (oject.Create ("Microsoft.XMLHTTP", ))
  190.     .If (IsEmpty (call) = True)
  191.         oject.Call ("Open", "GET", adder, False)
  192.     .else
  193.         oject.Call ("Open", call, adder, False)
  194.     .ife_end
  195.     oject.Call ("Send", )
  196.     bin = oject.GetProperty ("ResponseBody", ).GetBin ()
  197.     Return (bin)
  198. .else
  199.     Return (CBin (""))
  200. .ife_end


  201. .Sub _Browser1_StartLoading

  202. SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, "StartLoading"), "StartLoading")


  203. .Sub _Browser1_AfterLoad

  204. SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, "AfterLoad"), "AfterLoad")
  205. 同步标题 ()

  206. .Sub SetTab_Box_Function, , Export
  207. .Arg Index, Integer
  208. .Arg Name, String
  209. .Arg Tip, String

  210. Tab.SetTabName (Index, Name)
  211. Tab.SetTabTip (Index, Tip)

  212. .Sub _Browser1_OpeningNew, Boolean

  213. 新建页面 (IE [Tab.CurrentTab].StatusText)

  214. .Sub _Browser1_CaptionChange

  215. 同步标题 ()

  216. .Sub 同步标题, , Export, EPL HTMLBrower Fne Error SY dome TB Caption
  217. .LocalVar Temp, String

  218. .If (IE [Tab.CurrentTab].Caption <> "Internet Explorer 无法显示该网页")
  219.     SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, Temp), IE [Tab.CurrentTab].Caption)
  220.     Caption = MainCaption + " " + IE [Tab.CurrentTab].Caption
  221. .else
  222.     Temp = MainCaption + " " + "无法显示该网页"
  223.     SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, Temp), Temp)
  224.     Caption = Temp
  225. .ife_end


  226. .Sub TabCaptionFunction, String
  227. .Arg Width, Integer
  228. .Arg Char, String
  229. .LocalVar temp_Width, Integer
  230. .LocalVar Temp_Count, Integer, , "2"
  231. .LocalVar Temp_Char, String

  232. temp_Width = Width
  233. Temp_Count [1] = StrLen (Char)
  234. Temp_Count [2] = temp_Width - Temp_Count [1]
  235. .If (Temp_Count [2] <= 0)
  236.     Return (StrLeft (Char, temp_Width) + "...")
  237. .else
  238.     .Count (Temp_Count [2] / 2, )
  239.         Temp_Char = Temp_Char + " "
  240.     .CountNext ()
  241.     Temp_Char = Temp_Char + Char + Temp_Char
  242.     Return (StrLeft (Temp_Char, #MY_024))
  243. .ife_end


  244. .Sub _Browser1_AfterNavigate

  245. DZL.Text = IE [Tab.CurrentTab].URL
  246. ProgressBar1.Position = ProgressBar1.Min
  247. ComboBox_Add (IE [Tab.CurrentTab].URL)

  248. .Sub _Browser1_Progress
  249. .Arg ProgressPercent, Integer

  250. ProgressBar1.Position = ProgressPercent
  251. ProgressBar1.ZOrder (3)


  252. .Sub _Tab_DblClick, Boolean
  253. .Arg x, Integer
  254. .Arg y, Integer
  255. .Arg KeyState, Integer

  256. _当前页_Click ()


  257. .Sub _SSL_GetFocus

  258. SSL.Text = ""

  259. .Sub _SSL_LostFocus

  260. SSL.Text = "百度一下,你就知道"

  261. .Sub _DZL_LButtonDown, Boolean
  262. .Arg x, Integer
  263. .Arg y, Integer
  264. .Arg KeyState, Integer

  265. DZL.SetFocus ()


  266. .Sub _Tab_LButtonDown, Boolean
  267. .Arg x, Integer
  268. .Arg y, Integer
  269. .Arg KeyState, Integer

  270. IE [Tab.CurrentTab].SetFocus ()


  271. .Sub _XLCD_Click

  272. ComboBox1.SendMessage (335, 1, 0)


  273. .Sub ComboBox_Add, , Export
  274. .Arg 文本, String
  275. .LocalVar 寄存器, String
  276. .LocalVar 索引, Integer
  277. .LocalVar 次数, Integer

  278. 寄存器 = 文本
  279. .IfTrue (InStr (寄存器, "about:blank", , False) = -1)
  280.     .Count (ComboBox1.GetItemCount (), 索引)
  281.         .IfTrue (ComboBox1.GetItemText (索引 - 1) = 文本)
  282.             次数 = 次数 + 1
  283.         .if_end

  284.     .CountNext ()
  285.     .IfTrue (次数 = 0)
  286.         ComboBox1.AddItem (寄存器, )
  287.     .if_end

  288. .if_end


  289. .Sub _ComboBox1_ItemSelect

  290. DZL.Text = ComboBox1.Text
  291. _ZD_Click ()

  292. .Sub _ZD_Click

  293. .IfTrue (TrimAll (DZL.Text) <> "")
  294.     跳转页面 (DZL.Text, False, -1, Tab.CurrentTab)
  295. .if_end


  296. .Sub _SS_Click

  297. .IfTrue (TrimAll (SSL.Text) <> "")
  298.     DZL.Text = SSL.Text
  299.     _ZD_Click ()
  300. .if_end

复制代码
启动函数集
  1. .DocVersion 2

  2. .Module MainModule

  3. .Sub _MainFunction, Integer, , This sub function will be executed first after program starts


  4. Return (Function_LoadWindow () - 1)  ' You can return any number as you need

  5. .Sub Function_LoadWindow, Integer, Export

  6. Return (CInt (Load (MainForm, , False)))
复制代码
  1. .DocVersion 2

  2. .Const MY_024, "24"
  3. .Const MY_03, "3"
复制代码
源码下载地址:
EPL Source Code.rar (51.75 KB, 下载次数: 290)


作者: 毅然天山    时间: 2012-10-27 21:30
哇!好源码!顶了!
作者: 无阻    时间: 2012-10-27 21:31
提示: 作者被禁止或删除 内容自动屏蔽
作者: 诗一    时间: 2012-10-27 21:34
前排支持啦
作者: 紅顏じ亦沉淪ジ    时间: 2012-10-27 21:38
不错。。挺好看的。。。英文版的易语言到底在哪里下载。。。。一直没找到
作者: stillness    时间: 2012-10-27 21:39
String 字符串,文本型
Bin 字节集
boolean 逻辑型
Datetime 时间
Byte 字节
float 浮点
integer 整数型
functionAddress 子程序指针

作者: Will    时间: 2012-10-27 21:43
破J版一直没有找到。。
作者: ZealotMaster    时间: 2012-10-27 21:46
我最想知道的是。。。EF怎么破J!还有。。。为什么程序写的大了之后,就会自动跳出。。。
作者: stillness    时间: 2012-10-27 21:46

  1. on(relss)
  2. {
  3.         var a:new Date;
  4.         switch ( a.Day )
  5.         {
  6.                 case : 0
  7.                 trace ( “星期日" ) ;
  8.                 break;
  9.                 default :
  10.                 trace("未知日期") ;
  11.         }

  12. }
复制代码

作者: 许你,一世承诺    时间: 2012-10-27 22:01
我去,WIN8啊,牛B啊,可惜我的电脑太垃圾了,以前是XP的改成了win7的,有点卡卡的,如果做装win8,那还不要卡死了?
作者: 御风软件    时间: 2012-10-27 22:16
喜欢英文的啊,我还想全部中文的呢。。。。
作者: 御风软件    时间: 2012-10-27 22:27
御风软件 发表于 2012-10-27 22:16
喜欢英文的啊,我还想全部中文的呢。。。。

不会吧,人家自己写的,不用模块的,都不报毒,有的人加下壳,也安全了
作者: 宇智波·佐助    时间: 2012-10-28 11:19
好多英文啊
作者: 更换QQ账号    时间: 2012-11-3 21:32
我明白了,知道好东西啊啊啊啊
作者: jiuxiao    时间: 2012-11-6 17:13
顶死楼主
作者: 梦﹀场    时间: 2012-11-11 16:27
竟然下载失败了
作者: xuejiejie    时间: 2012-11-13 20:59
我明白了,知道好东西啊啊啊
作者: 随メ缘﹎    时间: 2012-11-14 19:08
爱做易语言的小程序
作者: heikechenshao    时间: 2012-11-14 21:55
提示: 作者被禁止或删除 内容自动屏蔽
作者: 黑暗之女    时间: 2012-11-22 13:18

作者: 小陌◇    时间: 2012-11-22 19:39
顶顶顶顶顶顶顶顶顶
作者: 毅然天山    时间: 2012-11-25 17:38
我看看看。。。。。。。。。。。
作者: 独行者    时间: 2012-12-13 22:41
好东西!

作者: 易人易友    时间: 2013-2-1 09:31
支持了,易支持库编译的速度都很慢不知道有没有解决
作者: 鹏℡    时间: 2013-2-5 22:15
看不懂  蛋疼中
作者: 84053625    时间: 2013-2-7 20:03
看看!!!
作者: 毅然天山    时间: 2013-3-1 22:30
不错,我看看!!!
作者: BYxchupeng    时间: 2013-3-8 15:26
下载咯
作者: BYxchupeng    时间: 2013-3-8 15:27
看是很神奇
作者: 夜深殇自会来    时间: 2013-3-9 11:30
EPL是什么?
作者: 夜深殇自会来    时间: 2013-3-9 11:48
顶一。。
作者: 青岛影迷之家    时间: 2013-3-9 15:26
学习正需要,谢谢
作者: sbsba    时间: 2013-4-6 23:36
学习
作者: 小豌豆Felix℡    时间: 2013-4-12 02:23
InPrivate这什么意思
作者: 小豌豆Felix℡    时间: 2013-4-12 02:24
InPrivate,我想调用InPrivate浏览填表,这样可以多开软件多账号在同一个论坛发帖
作者: snrmyd    时间: 2013-4-14 10:20
看上去不错
作者: 后续    时间: 2013-4-14 22:59
看看哈
作者: 小袋    时间: 2013-5-1 10:36
萨达阿是大声道阿斯达
作者: zuoyanjiang    时间: 2013-6-1 12:29
下载后告诉你们好用不
作者: 非常完美    时间: 2013-6-29 15:52
EPL是什么?
作者: 565664564    时间: 2013-7-5 09:43
提示: 作者被禁止或删除 内容自动屏蔽
作者: 慢慢变黑    时间: 2013-7-21 20:31
学习正需要,谢谢

本文章来自:精易论坛(http://125.confly.eu.org/forum.php?mod=viewthread&tid=136309)请保留此链接, 感谢!
作者: 942129496    时间: 2013-7-28 20:02
的数据库哈斯就
作者: e时代无名    时间: 2013-8-18 23:49
美观不错 呵呵
作者: ye347549299    时间: 2014-12-1 17:17
我要找一个非常好的浏览器
作者: 酷酷的滕啊    时间: 2017-10-29 16:53
66666666666666666
作者: 2161045897    时间: 2019-4-29 20:55
感谢分享~····




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4