Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #9958
| From | Todd Vargo <tlvargo@sbcglobal.netz> |
|---|---|
| Newsgroups | microsoft.public.scripting.jscript, microsoft.public.scripting.vbscript, comp.lang.javascript |
| Subject | Re: JScript - WScript output similar to CScript output> |
| Date | 2012-01-06 05:20 -0500 |
| Organization | albasani.net |
| Message-ID | <je6hu0$pvp$1@news.albasani.net> (permalink) |
| References | (1 earlier) <je0ce6$3q1$1@dont-email.me> <je0plc$u6g$1@news.albasani.net> <je1mtu$50r$1@dont-email.me> <je1ocf$e6m$1@dont-email.me> <BgivRqI0ggBPFwNs@invalid.uk.co.demon.merlyn.invalid> |
Cross-posted to 3 groups.
On 1/5/2012 3:29 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message<je1ocf$e6m$1@dont-email.me>, Wed, 4 Jan
> 2012 09:40:15, "Dave \"Crash\" Dummy"<invalid@invalid.invalid> posted:
>
>>
>> The trouble with "file type" as stored in the registry and read by
>> "objFile.type" is that it can be and often is changed by applications. For
>> example, on my computer the ".bmp" file mentioned above is a "Paint
>> Shop
>> Pro 5 Image," not a "Paint.Picture."
>
> The fact that the Type string can be changed provides a good reason for
> having a convenient way to read the Type string.
>
> Typically, MS make it harder to tell by code whether a file's Type is
> known or not by putting an uninformative but readable string where they
> could more easily have put an empty string or a recognisable language-
> independent one such as "-".
>
> No-one has actually answered the question.
Your question was malformed. It did not request to provide code to
demonstrate a different method from the one you previously chose. As
indicated, your answer can be found in HKCR but effort on your part is
necessary to capture it.
> Let's try another.
>
> The CScript in question is started from the DOS-box command-line and
> writes lines to the screen - it would run perfectly well on an ASR33
> teletype. At present, if started in WScript, it exits leaving a small
> note.
>
> It would be nice to allow execution by WScript, with GUI output; but, to
> be worth doing, it would be necessary for there to be an easy way of
> creating and writing (line by line) to something resembling an HTML
> textarea. Is that available, and if so how is it done or where do I
> need to look?
Not even going to attempt to research it on your own?
Watch for the line wraps...
'''''' Creates an Internet Explorer instance to display VBScript output
''''''
'On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objExplorer = Wscript.CreateObject("InternetExplorer.Application",
"IE_")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = False
objExplorer.StatusBar = False
objExplorer.Top = 180
objExplorer.Left = 200
objExplorer.Width = 630
objExplorer.Height = 320
objExplorer.Visible = True
objExplorer.Resizable = False
Do While (objExplorer.Busy) 'Wait for Iexplore instance to load
Wscript.Sleep 250
Loop
With objExplorer.Document
.Writeln "<html><head><title></title></head><body>"
.Title = Wscript.ScriptName & " is running... "
.body.style.cursor = "Wait"
.Writeln "<img
src=""http://www.merlyn.demon.co.uk/graphics/merlyn-1.gif"">"
.Writeln "<p class=""style2""><B>Please wait while APPLICATION is
loading...</B></p>"
For x = 1 to 25
.Writeln "Line..." & x & "<br>"
WScript.Sleep(50) 'Pause 50 miliseconds
.body.createtextrange.scrollIntoView False 'Scroll to bottom of page
Next
.Writeln "<p>Ok - Bye.</p><br>"
.body.createtextrange.scrollIntoView False 'Scroll to bottom of page
.body.style.cursor = "" 'Return cursor to normal
.Title = Wscript.ScriptName & " is Done! "
End With
WScript.Sleep(5000) 'Pause 5 seconds
objExplorer.Quit 'Close the status window
Set objExplorer = Nothing
Wscript.Quit
Sub IE_onQuit() 'This subroutine will fire when Iexplore is closed
'Script will continue to run after IE window closes.
MsgBox "User closed window!"
End Sub
--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
JScript - is a file of a known Type? Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-03 17:09 +0000
Re: JScript - is a file of a known Type? "Mayayana" <mayayana@invalid.nospam> - 2012-01-03 21:13 -0500
Re: JScript - is a file of a known Type? Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-04 00:55 -0500
Re: JScript - is a file of a known Type? "Mayayana" <mayayana@invalid.nospam> - 2012-01-04 09:18 -0500
Re: JScript - is a file of a known Type? "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2012-01-04 09:40 -0500
Re: JScript - is a file of a known Type? "Mayayana" <mayayana@invalid.nospam> - 2012-01-04 10:23 -0500
Re: JScript - is a file of a known Type? Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-04 20:22 -0500
Re: JScript - is a file of a known Type? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-05 22:01 -0800
Re: JScript - is a file of a known Type? John G Harris <john@nospam.demon.co.uk> - 2012-01-06 11:04 +0000
Re: JScript - is a file of a known Type? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-06 04:26 -0800
Re: JScript - is a file of a known Type? John G Harris <john@nospam.demon.co.uk> - 2012-01-06 14:58 +0000
Re: JScript - is a file of a known Type? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-06 12:27 -0800
Re: JScript - is a file of a known Type? Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 21:54 +0000
JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-05 20:29 +0000
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-05 22:05 -0800
Re: JScript - WScript output similar to CScript output> Bwig Zomberi <zomberiMAPSONNOSPAM@gmail.invalid> - 2012-01-06 14:31 +0530
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 21:14 +0000
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 21:10 +0000
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-08 14:52 -0800
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1202@merlyn.demon.co.uk> - 2012-01-09 23:45 +0000
Re: JScript - WScript output similar to CScript output> Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-10 00:27 -0500
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <J.R.Stockton@physics.org> - 2012-01-10 13:40 -0800
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-10 17:04 -0800
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1202@merlyn.demon.co.uk> - 2012-01-12 23:43 +0000
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-12 22:36 -0800
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-12 22:47 -0800
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <J.R.Stockton@physics.org> - 2012-01-14 12:15 -0800
Re: JScript - WScript output similar to CScript output> Bwig Zomberi <zomberiMAPSONNOSPAM@gmail.invalid> - 2012-01-06 14:43 +0530
Re: JScript - WScript output similar to CScript output> Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-06 05:20 -0500
Re: JScript - WScript output similar to CScript output> "Mayayana" <mayayana@invalid.nospam> - 2012-01-06 08:33 -0500
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 20:11 +0000
csiph-web