Questions tagged [jscript]

JScript is a scripting language based on the ECMAScript standard, created by Microsoft and implemented in a range of environments. You would expect this tag to accompany questions regarding these environments, such as Windows Script Host (WSH), Active Server Pages (ASP) and HTML Applications (HTA).

JScript is a scripting language based on the standard, created by Microsoft and implemented in a range of environments, including:

JScript is not to be confused with JavaScript () — although they are both implementations of the ECMAScript language — because, often, people refer to JScript when discussing client or server scripting outside of a web page. As such, you would expect the tag to accompany , or questions. was named after JScript, but it is not the same.

JScript supports several unique features such as conditional compilation, COM object instantiation and a method to force garbage collection.

Official Documentation

1180 questions
4
votes
2 answers

JavaScript RegExp - g modifier not working

I have been stuck on this silly issue for hours now. I know it seems stupid but I really don't know what I am missing. Any help would be appreciated. Here's my issue: var objReg = /touch/g; var str = "abc touch def touch"; var arr =…
ManJoey
  • 213
  • 2
  • 7
4
votes
3 answers

Simple DOM Manipulation Without Console Window or Dependencies

I am writing a solution for users to open a file, and this file should navigate to a certain website and insert the user's username into the login form for them. This file needs to be accessed by users which are on a citrix session. This should be…
Bassie
  • 9,529
  • 8
  • 68
  • 159
4
votes
3 answers

How to convert an image file to BMP programmatically using native Windows XP capabilities?

Is it possible to convert an image file to BMP format using WindowsXP's native libraries and scripting capabilities? I'm talking about WSH, JScript, VBS, etc... C++ is also good for what I need if it can be compiled with Dev-C++
GetFree
  • 40,278
  • 18
  • 77
  • 104
4
votes
2 answers

Make an HTA file run as admin (elevated)

In wsf, vbs and js files you can easily find out if they run elevated and if not you can easily make them. The code I've written for that is this: EnsureElevatedPrivileges(); WScript.Echo("Running elevated now!"); function…
Forivin
  • 14,780
  • 27
  • 106
  • 199
4
votes
2 answers

How to print a file with Jscript

Goal I want to print a file via a PDF printer which isn't the default printer. I was able to temporary change the normal printer to the PDF printer. Problem But I don't know how to print a .doc, .txt or .xls via Jscript. Also, I can't find a way to…
nixda
  • 2,654
  • 12
  • 49
  • 82
4
votes
1 answer

MixItUp random filter on page load in Bootstrap

Been tinkering with MixItUp in Bootstrap. I have it all working in the col structure adding classes to the lists but I can't get it to load randomly every time the page is refreshed! I've used the following $(function(){ $('#Grid').mixitup({ …
4
votes
1 answer

ActiveXObject to download directly to HDD

Is there a native ActiveX Object or similar that I can use to download a source file straight to my HDD. Currently I'm using the following: function downloadToFile(url, file) { var xhr = new ActiveXObject("msxml2.xmlhttp"), ado = new…
SReject
  • 3,774
  • 1
  • 25
  • 41
4
votes
3 answers

JScript IDE with autocomplete for COM objects created with ActiveXObject () function

Is there a JScript IDE with autocomplete for COM objects created with ActiveXObject() function? i.e. so that after typing the following piece of code the IDE would display the list of methods / properties of the ExcelApp object: var ExcelApp = new…
colemik
  • 1,417
  • 2
  • 20
  • 24
4
votes
2 answers

CRM 2011 JScript retrieveMultiple throwing Bad Request Error

I am trying to retrieve multiple records using oData on Contact form but it's throwing Bad Request error. Can anyone suggest me why it's happening. Thanks in advance JScript // Retrieving multiple connections with accound ID as Record2Id. function…
user1211185
  • 731
  • 3
  • 12
  • 27
4
votes
1 answer

Cscript. How to make a multi-colored text

I'm trying to get a multi-colored text to the console using Cscript. WScript.Echo('\033[31m' + 'Some Text' + '\033[0m'); This solution does not work. Is there any way to get the multi-colored text to the console?
AndrewC
  • 83
  • 1
  • 5
4
votes
2 answers

JScript: Dynamically load JavaScript libraries

I am currently writing a JavaScript script for the Microsoft JScript Runtime Environment. It's not in a browser, but rather going to be run more like a SysAdmin would use VBScript. I've written a lot of code, and while some of it is specific for…
SomeShinyObject
  • 7,581
  • 6
  • 39
  • 59
4
votes
1 answer

how to extract text from an element in an xml string in classic asp

I have the following xml: amzn1.contract.1.1.1.d6779be6bf481167fe945
Graham
  • 7,807
  • 20
  • 69
  • 114
4
votes
1 answer

How do I download an attachment from an annotation using client-side JScript?

I'm trying to provide a link to the attachment of a note through the client-side JScript. The standard MS-made Notes component does this through the following…
VVander
  • 308
  • 1
  • 4
  • 10
3
votes
2 answers

converting javascript to exe, WScript has not been declared

We have a javascript that i would like to compile to a exe. I am using the jsc.exe to do this. However, i get the following error when attempting to compile. error JS1135: Variable 'WScript' has not been declared Here is the segment of code: var…
prolink007
  • 33,872
  • 24
  • 117
  • 185
3
votes
3 answers

Are there performance, scalability, or reliability disadvantages to Classic ASP/JScript?

Writing Classic ASP code in JScript has a lot going for it: more humane syntax, a sane object system, programmer familiarity, and a general lack of annoyances. You can even mix legacy VBScript and new JScript code in your existing Classic ASP apps…
smammy
  • 2,625
  • 1
  • 15
  • 11