Difference between revisions of "JScript"

From TheAlmightyGuru
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''JScript''' is a scripting language created by [[Microsoft]] as a custom implementation of  [[JavaScript]]. It is executed in [[Windows]] by the [[Windows Scripting Host]] using Microsoft OLE Automation along with [[VBScript]]. It was first released for use with [[Internet Explorer]] 3.0 in August 1996, and has been included with every desktop version of Windows since [[Windows 98]]. It was last updated on 2011-03-14 with the release of Internet Explorer 9.0. Microsoft appears to have discontinued the language in favor of [[JScript .NET]], but JScript .NET is hardly a replacement as it must be compiled before using. Unlike JavaScript, JScript only works with Microsoft [[Windows]], so it's not useful for cross-platform design.
+
'''JScript''' is a [[computer programming|scripting language]] created by [[Microsoft]] as a custom implementation of  [[JavaScript]]. It is executed in [[Windows]] by the [[Windows Scripting Host]] using Microsoft OLE Automation, just like [[VBScript]]. It was first released for use with [[Internet Explorer]] 3.0 in August 1996, and has been included with every desktop version of Windows since [[Windows 98]]. It was last updated on 2011-03-14 with the release of Internet Explorer 9.0. Microsoft appears to have silently discontinued the language in favor of [[JScript .NET]]. Unfortunately, JScript .NET is hardly a replacement as it must be compiled before using. Unlike JavaScript, JScript only works with Microsoft [[Windows]], so it's not useful for cross-platform design. Also, the name of the language was poorly thought out because most Internet searches turn up results for JavaScript instead.
  
I first learned about JScript in the mid-2000s because I often accessed the [[Windows Scripting Host]] to have access to some functions not available in the language I was working in at the time. Later, I found that you could write and execute standalone .js and .vbs files in JScript and VBScript. Since then, I have used JScript to write various scripts to automate processes in Windows including running programs that support command line access, accessing the [[ImageMagic]] ActiveX, and performing instructions more complex than those supported by Windows [[Batch file|batch files]]. Examples of each of these implementations can be seen in the example scripts I have on this site.
+
I first learned about JScript in the mid-2000s because I often accessed the [[Windows Scripting Host]] to have access to some functions not available in the language I was working in at the time. Later, I found that you could write and execute standalone .js and .vbs files in JScript and VBScript. Since then, I have used JScript to write various scripts to automate processes in Windows including running programs that support [[command line]] access, accessing the [[ImageMagick]] ActiveX, and performing instructions more complex than those supported by Windows [[batch file|batch files]]. Examples of each of these implementations can be seen in the example scripts I have on this site.
  
 
==Scripts==
 
==Scripts==
Line 10: Line 10:
  
 
* [[Media:Windows Script Help v5.6.zip|Download]] ([[:File:Windows Script Help v5.6.zip|Info]]) - Help documentation v5.6.
 
* [[Media:Windows Script Help v5.6.zip|Download]] ([[:File:Windows Script Help v5.6.zip|Info]]) - Help documentation v5.6.
 +
 +
==Basic Operations==
 +
===Message Box===
 +
var shell = new ActiveXObject("WScript.Shell");
 +
shell.Popup("Hello World.");
  
 
==Links==
 
==Links==
* [https://en.wikipedia.org/wiki/JScript en.wikipedia.org/wiki/JScript] - Wikipedia.
+
{{Link|Wikipedia|https://en.wikipedia.org/wiki/JScript}}
  
  
 
[[Category: Programming Languages]]
 
[[Category: Programming Languages]]
 
[[Category: Scripting Languages]]
 
[[Category: Scripting Languages]]

Latest revision as of 15:59, 25 March 2020

JScript is a scripting language created by Microsoft as a custom implementation of JavaScript. It is executed in Windows by the Windows Scripting Host using Microsoft OLE Automation, just like VBScript. It was first released for use with Internet Explorer 3.0 in August 1996, and has been included with every desktop version of Windows since Windows 98. It was last updated on 2011-03-14 with the release of Internet Explorer 9.0. Microsoft appears to have silently discontinued the language in favor of JScript .NET. Unfortunately, JScript .NET is hardly a replacement as it must be compiled before using. Unlike JavaScript, JScript only works with Microsoft Windows, so it's not useful for cross-platform design. Also, the name of the language was poorly thought out because most Internet searches turn up results for JavaScript instead.

I first learned about JScript in the mid-2000s because I often accessed the Windows Scripting Host to have access to some functions not available in the language I was working in at the time. Later, I found that you could write and execute standalone .js and .vbs files in JScript and VBScript. Since then, I have used JScript to write various scripts to automate processes in Windows including running programs that support command line access, accessing the ImageMagick ActiveX, and performing instructions more complex than those supported by Windows batch files. Examples of each of these implementations can be seen in the example scripts I have on this site.

Scripts

Documentation

This is the latest help documentation for Windows Scripting which implements JScript. Microsoft's latest version is 5.7, but, as far as I know, the last help documentation they released was for version 5.6.

Basic Operations

Message Box

var shell = new ActiveXObject("WScript.Shell");
shell.Popup("Hello World.");

Links

Link-Wikipedia.png