Contributions
Re: Inheriting from Array not working as expected (JScript)
Even if you do extend the array prototype it will only apply in that single unit. What will work is defining iteration functions (that can be global) that take an array argument. For instance I have a MAP function that I use as a general iterator, stolen from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map function MAP(arr, callback, thisArg) { var T, A, k; if (arr == null) { return false; } var O = Object(arr); var len = O.length >>> 0; if (typeof callback != "function") { throw new TypeError(callback + " is not a function"); } if (thisArg) { T = thisArg; } A = new Array(len); k = 0; while(k < len) { var kValue, mappedValue; if (k in O) { kValue = O[ k ]; mappedValue = callback.call(T, kValue, k, O); A[ k ] = mappedValue; } k++; } return A; }934Views0likes0CommentsRe: JScript vs VBScript
Couple of points to make here: I've been writing Javascript for 15 years or so and I can probably count the number of times I've genuinely needed to use new String(), new Array(), new Object(), etc on the fingers of one hand. new String() isn't used to initialise a string value, it's to create an object which inherits from the String prototype, to which you can attach new properties and methods. Another thing is that the .toString() method of your text object may be a method of that object in its original development language, not the similarly name javascript method. For instance, in a Java SWT application there may be fields that contain Java strings, which appear to have text values but javascript can only interpret the object's OleValue property as a string. The Object Browser is your friend here. Lastly, if you like the terseness of LCase, simply declare a function to do the equivalent, rather than writing out the conversion long-hand every time.2.5KViews2likes0CommentsRe: Error runtime execution Microsoft JScript
That seems unlikely. The script is probably just running faster than the application. As Gena said, use the Wait methods rather than assuming all objects are available immediately. Also look at how to launch applications via TestedApps rather than relying on clicking things in Explorer.1.2KViews1like0Comments- 2.4KViews0likes0Comments