Declare Function ShowWindow Lib "user32" (ByVal hwnd As Integer, ByVal nCmdShow As Integer) As Integer <#Module=mdlDemo> '--------------------------------------- Sub Load(cmdLine) form.move 17000,2000,5000,1500 form.add "timer",1, ".Interval = 500", "Enabled = True" form.add "check",1, ".Move 300,300,1000,450", ".caption=""Enable""" With form.add("lcombo",1, ".Move 2000,400,2000") : For a = 0 To 10 : .AddItem a * 100 & " ms." : Next : .listindex = 7 : End With form.style.topmost = true form.show End Sub <#Module> <#Form=form> Dim IE, Enable '----------------------------------------- Sub Load_IE() Set IE = CreateObject("InternetExplorer.Application") IE.Navigate "klavogonki.ru/go?type=normal" ShowWindow IE.hWnd, 3 IE.Visible = True End Sub '----------------------------------------- Function Grab() on error resume next this.timer(1).enabled = false typeGame = IE.Document.getElementById("gamedesc").innerTEXT endGame = IE.Document.getElementById("bookinfo").innerTEXT if len(endGame) = 0 then style = IE.Document.getElementById("typefocus").className txt = GetText("typefocus", typeGame =~ i/english//) eol = IE.Document.getElementById("afterfocus").innerTEXT if len(eol) = 1 then txt = txt + eol this.caption = "Word = " & txt if Len(txt) > 0 and this.check(1).value = 1 And this.style.topmost = false then if instr(style, "_error") > 0 then sys.ext.sendkeys "{BACKSPACE 15}", true else sys.ext.sendkeys txt + " ", true end if end if else this.caption = "Finish" end if Randomize Timer this.timer(1).interval = sys.var.val(this.lcombo(1).text) + Int(Rnd * 100) + 50 this.timer(1).enabled = true 'sys.conv.str2file IE.Document.getElementById("typetext").innerHTML, "innerHTML.txt" End Function '----------------------------------------- Function GetText(elem, isEng) Dim txt on error resume next txt = IE.Document.getElementById(elem).innerHTML txt =~ igm/".*?<\/span>"/""/ txt =~ igm/"<[^>]+?>"/""/ if isEng = false then tbl = Array("a", "à", "A", "À", "e", "å", "E", "Å", "T", "Ò", "o", "î", "O", "Î", "p", "ð", "P", "Ð", "H", "Í", "k", "ê", "K", "Ê", _ "x", "õ", "X", "Õ", "c", "ñ", "C", "Ñ", "B", "Â", "M", "Ì", "(", "{(}", ")", "{)}") txt = sys.ext.modify(txt, tbl, -2) end if GetText = txt End Function '----------------------------------------- Sub Form_Load() Load_IE End Sub '----------------------------------------- Sub Timer1_Timer() Grab End Sub '----------------------------------------- Function WindowProc(bHandled, hwnd, umsg, wparam, lparam, dwRefData) if umsg = 6 then If wParam > 0 And wParam < 3 Then this.check(1).value = 0 else this.timer(1).enabled = false this.timer(1).interval = 500 this.timer(1).enabled = true end if end if End Function '----------------------------------------- Sub Form_Unload() If IsObject(IE) Then Sys.Ext.WaitIE IE, 2 Set IE = Nothing endmf End Sub <#Form>