Option explicit Function OpenAsTextOld '--------------------------------- const gstrCommand = "notepad %1" const TemporaryFolder = 2 '--------------------------------- ' Zjistim si text ze stranky dim s 'as String s = document.body.innerText '--------------------------------- ' ulozim text do temp souboru dim fName 'as String dim fso 'as Object dim fld ' as Object dim f 'as Object Set fso = CreateObject("Scripting.FileSystemObject") Set fld = fso.GetSpecialFolder(TemporaryFolder) fName = fld.Path & "\" & fso.GetTempName Set f = fso.CreateTextFile(fName, True) call f.Write(s) call f.Close '--------------------------------- ' zobrazim soubor dim shell ' as Object Set shell = CreateObject("WScript.Shell") call shell.Run(Replace(GetWMPath & gstrCommand, "%1", fName), 1, true) call fso.DeleteFile(fName) End Function Private Function isStopTag(ByVal TagName) TagName = LCase(TagName) isStopTag = (TagName = "html") Or (TagName = "body") Or (TagName = "span") End Function Function OpenAsText 'NOP End Function Function OpenAsTextEx '--------------------------------- const gstrCommand = " %1 /t /b /r" const TemporaryFolder = 2 '--------------------------------- ' Zjistim si text ze stranky dim s 'as String dim e 'as IHTMLElement Set e = document.activeElement Do While Not isStopTag(e.TagName) Set e = e.parentElement Loop s = e.innerText '--------------------------------- ' ulozim text do temp souboru dim fName 'as String dim fso 'as Object dim fld ' as Object dim f 'as Object Set fso = CreateObject("Scripting.FileSystemObject") Set fld = fso.GetSpecialFolder(TemporaryFolder) fName = fld.Path & "\" & fso.GetTempName Set f = fso.CreateTextFile(fName, True) call f.Write(s) call f.Close '--------------------------------- ' zobrazim soubor dim shell ' as Object dim wmPath Set shell = CreateObject("WScript.Shell") wmPath = shell.RegRead("HKCU\Software\Elvos\WinMonitor\Path") wmPath = """" & wmPath & "\talkman.exe" & """" 'call shell.PopUp(wmPath,,,vbOKOnly) call shell.Run(Replace(wmPath & gstrCommand, "%1", fName), 1, true) call fso.DeleteFile(fName) End Function Sub DoWMAction(strAction) dim WM Set WM = CreateObject("WinMonitor.Application") call WM.DoAction(strAction) End Sub Sub ShowDir() Dim ie 'My_IE.Navigate("C:\") set ie = CreateObject("InternetExplorer.Application") 'Parent.frames("Body").document.all.location.path = End Sub Sub ShowProp() dim shell ' as Object Set shell = CreateObject("WScript.Shell") call shell.Run("C:\WINDOWS\RUNDLL32.EXE shell32.dll,Control_RunDLL desk.cpl,,2") End Sub Sub changeMe(info) on error resume next 'call alert(info) Parent.frames("Menu").document.all("MyText").innertext = info End Sub Sub ShowSetFolder() dim shell On Error Resume next Set shell = CreateObject("WScript.Shell") call Shell.Run("explorer C:\program files\winmonitor 5.0\set") End Sub Sub ShowFile() dim shell On Error Resume next Set shell = CreateObject("WScript.Shell") call Shell.Run("notepad C:\program files\winmonitor 5.0\set\command.mnu") End Sub Sub RunMenuEditor() dim shell 'On Error Resume next Set shell = CreateObject("WScript.Shell") call Shell.Run("""C:\program files\winmonitor 5.0\menueditor.exe""") End Sub