jscript

Parsing a JSON object array in Excel VBA

核能气质少年 提交于 2019-11-27 02:25:28
问题 I know a similar question has been asked and answered before a few times: Parsing JSON in Excel VBA, Excel VBA: Parsed JSON Object Loop However, the above solution doesn't work if I am trying to access an array within the returned object. I'm receiving a JSON object from the Google Translate API in the following format: "{ "sentences":[ { "trans":"Responsibility\n", "orig":"??", "translit":"", "src_translit":"Zérèn" }, { "trans":"Department", "orig":"??", "translit":"", "src_translit":"Bùmén"

cscript jscript JSON

拜拜、爱过 提交于 2019-11-27 02:20:35
问题 This is a very very (very!!!) strange problem. I have this JSCRIPT that runs on windows XP and 7 using dos CSCRIPT in a file called testJSON.js . if ( ! this.JSON ) WScript.Echo("JSON DOESN'T EXISTS"); And, well, the message appear, but is an unexpected behavior of JSCRIPT because JSON (as the MSDN documentation says) is one of the default object in the JSCRIPT 5.8 and my system on Windows 7 runs exactly JSCRIPT 5.8 . Now, I have temporary solved this problem (in a little complex script) by

How to replace comma with a dot in the number (or any replacement) [duplicate]

有些话、适合烂在心里 提交于 2019-11-27 01:45:22
问题 This question already has an answer here: Replace method doesn't work 4 answers I could not found a solution yet, for replacing , with a dot. var tt="88,9827"; tt.replace(/,/g, '.') alert(tt) //88,9827 i'm trying to replace a comma a dot thanks in advance 回答1: As replace() creates/returns a new string rather than modifying the original ( tt ), you need to set the variable ( tt ) equal to the new string returned from the replace function. tt = tt.replace(/,/g, '.') JSFiddle 回答2: You can also

How to close a HTA window from another HTA?

不问归期 提交于 2019-11-26 18:38:21
问题 I've tried to implement my own modal dialogs (Why?). I open a new window using WScript.Shell : dlg = shell.Run(dlgPath, 1, true); The line above creates a "semi-modal" HTA window. The script execution is stopped at this line, but the main window is still responsive. This issue is tackled within onfocusin eventhandler, which returns focus back to the new HTA window using shell.AppActivate() . This prevents even "Close Window" button to close the main window. However, in Windows7 there's a back

What's the difference between JavaScript and JScript?

扶醉桌前 提交于 2019-11-26 15:10:35
I have always wondered WHaT tHE HecK?!? is the difference between JScript and JavaScript. Just different names for what is really ECMAScript. John Resig has a good explanation . Here's the full version breakdown: IE 6-7 support JScript 5 (which is equivalent to ECMAScript 3, JavaScript 1.5) IE 8 supports JScript 6 (which is equivalent to ECMAScript 3, JavaScript 1.5 - more bug fixes over JScript 5) Firefox 1.0 supports JavaScript 1.5 (ECMAScript 3 equivalent) Firefox 1.5 supports JavaScript 1.6 (1.5 + Array Extras + E4X + misc.) Firefox 2.0 supports JavaScript 1.7 (1.6 + Generator + Iterators

How can I download a file with batch file without using any external tools?

对着背影说爱祢 提交于 2019-11-26 01:47:53
First to clarify this question is aimed to HTTP(s) download .For FTP may be I'll ask (and answer) another question. Here are some similar questions - but I want to be more precise . Besides excluding external tools I want the solution(s) to be applicable for the widest possible types of windows machines (including XP,Win2003,Vista which still have big enough share). Also as WSH is one of the possible options I prefer no using of temp files and everything to be packed in a single .bat file (which is possible with both jscript and vbscript). What are possible approaches. "Pure" batch solution

How can I download a file with batch file without using any external tools?

天涯浪子 提交于 2019-11-26 01:08:19
问题 First to clarify this question is aimed to HTTP(s) download .For FTP may be I\'ll ask (and answer) another question. Here are some similar questions - but I want to be more precise . Besides excluding external tools I want the solution(s) to be applicable for the widest possible types of windows machines (including XP,Win2003,Vista which still have big enough share). Also as WSH is one of the possible options I prefer no using of temp files and everything to be packed in a single .bat file