jscript

WshShell.RegRead fails when reading key with default value not set (WinXP only)

会有一股神秘感。 提交于 2019-12-11 19:29:34
问题 I'm working with Windows Script Hosting (JScript). And my primary goal is to know if registry key exist. I'm trying to 'RegRead' this key and if it throws an error then key does not exist (that's how documentation says http://msdn.microsoft.com/en-us/library/x05fawxd(v=vs.84).aspx). Everything works fine in Win7, but when I test my code in WinXP it fails. The problem is that when you try to 'RegRead' key that has no default value set it will throw an error (only on WinXP, on Win7 it is ok).

I have problems to readSessionArchive() in FiddlerScript

强颜欢笑 提交于 2019-12-11 16:46:57
问题 so here is the code case "kancolle": FiddlerObject.log("kancolle start"); var inputPath = ** // ** is certain input path var kanFiles:String[] = System.IO.Directory.GetFiles(inputPath, "*.saz"); for (var i:int = 0; i<kanFiles.Length; ++i) // just 1 file in fact { FiddlerObject.log("kanFiles: " + i); var kanSessions:Session[] = Utilities.ReadSessionArchive(kanFiles[i], true); for (var i1:int = 0; i1<kanSessions.Length; ++i1) // 23 sessions there { FiddlerObject.log("kanSessions: " + i1);

Can HTAs be used to automate web browsing?

梦想与她 提交于 2019-12-11 14:45:42
问题 I am new to HTAs. I just read https://msdn.microsoft.com/en-us/library/ms536496%28v=vs.85%29.aspx and am a bit confused. Can I use HTAs to automate browsing? Say I want to download a web page and fill in a form automatically, i.e. from a script. How would an HTA help me do this, if at all? It's important that the JavaScript code in the downloaded page is run as usual. I should be able to enter somehow and fill in the form after it has finished initializing, just as if I were a human agent.

writing out a null in javascript

大城市里の小女人 提交于 2019-12-11 13:37:03
问题 This question is in follow up to this one: write binary data using JavaScript on the server. The problem there with just using Response.Write to write the string is that the string contains a null character which JavaScript recognizes as the end of the string. The string I'm trying to write starts with the following (written here in character codes) 255 216 255 212 0 16 ... JavaScript will only output the first 4 characters here, because it recognizes the 5th as a string terminator. Is there

how to pass javascript array to oracle store procedure by ado parameter object

天涯浪子 提交于 2019-12-11 13:22:48
问题 I am working on a asp+oracle web project, and I need a multiple user select function. 1, use javascript build up a string array : var userArray = ["Simon","Sheng","Cheng"]; 2, pass it by ado parameter object,but I don't know how to fill Parameter ojbect : var cmd = Server.CreateObject("ADODB.Command"); var param = cmd.CreateParameter("par",????????????)<--I don't know how to fill; 3, create store procedure in oracle create or replace package demo_pkg as type charArray is table of varchar2(255

Save an image present in PDF on local File System

亡梦爱人 提交于 2019-12-11 09:47:27
问题 This is my first experience of using PDFBox jar files. Also, I have recently started working on TestComplete. In short, all these things are new for me and I have been stuck on one issue for last few hours. I will try to explain as much as I can. Would really appreciate any help! Objective : To save an image present in a PDF file on the file system Issue : When this line gets executed objImage.write2file_2(strSavePath); , I get the error Object doesn't support this property or method . I am

How to set image extensions for insert image dialog of Summernote

女生的网名这么多〃 提交于 2019-12-11 06:44:57
问题 I am using Summernote and everything works fine but there is one thing I can't figure out. Below is the settings I am using for SummerNote: summerNoteElement.summernote({ toolbar: [ ['magic', ['style', 'h1', 'h2', 'h3', 'h4']], ['actions', ['undo', 'redo']], ['style', ['bold', 'italic', 'underline', 'clear']], ['font', ['fontname', 'strikethrough', 'superscript', 'subscript']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']], [

How to initiate on change event when selecting item from drop down list?

主宰稳场 提交于 2019-12-11 05:31:34
问题 I'm trying to trigger "on change" event upon selecting currency value from drop-down menu. This would update the mini spreadsheet on that page reflecting the value of the currency. However when changing the value through VBA jscript is not being triggered. I'm using IE to do this. Set objIE = New InternetExplorer objIE.Visible = True objIE.navigate "https://www.reuters.com/markets/currencies" Do While objIE.Busy = True Or objIE.readyState <> 4: DoEvents: Loop 'Settlement Currency is Hard

Obtain the `Local Project Path` directory in the project's `Version Control Settings`

瘦欲@ 提交于 2019-12-11 03:54:42
问题 Preface This relates directly to Enterprise Architect's API and its scripting capabilities and not so much with actual JScript/Javascript. Question How do you obtain the Local Project Path directory in the project's Version Control Settings using EA's scripting API? Note: [Package].XMLPath only provides the path relative to that location, which is unusable in my situation. Background Attempting to create script that adds all packages in an EA project to our version control software (MKS/PTC

Javascript array to VBScript

若如初见. 提交于 2019-12-11 02:59:30
问题 I have an array of objects built using Javascript and I need to read it using VBScript (as in the example below). I cannot find a way to loop through the array in my VbScript code as the myArray object. The example is a simplification of my problem. I cannot change the default language of the page. The myArray object must be built using javascript. The array must be output using inline vbscript. <%@ Language="VBScript" %> <script language="javascript" runat="server"> var myArray = [ { name: