Difference between revisions of "JScript"

From TheAlmightyGuru
Jump to: navigation, search
Line 1: Line 1:
'''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 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 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.
+
'''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 [[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.
 
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.

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