wsh

JavaScript killing a process

I am writing using JavaScript. I have a PID of a process. How do I kill it? You can terminate by a name using WMI, How can you do it using PID? UPDATE: The platform is Windows. ...

JScript: How to give focus to popup window

I'm making new window this way: var WSHShell = WScript.CreateObject("WScript.Shell"); WSHShell.Popup("This is popup."); But window appears under another ones. How can I move it to the front? ...

Parsing question

Hi All I am creating a scripting language to be used to create web pages, but don't know exactly where to begin. I have a file that looks like this: mylanguagename(main) { OnLoad(protected) { Display(img, text, link); } Canvas(public) { Image img: "Images\my_image.png"; ...

Creating a scripting language

Hi All Can somebody please guide me in the right direction of creating a scripting language that targets the WSH (Windows Scripting Host)? I have googled for it, but there seem to be far fewer links related to this than when I originally searched for it a few months back. THank you ...

New scripting language

Hi All I am trying to create a scripting language by myself (it doesn't have to be perfect - although that would be great if it was), mostly because i'm doing it for fun and to learn about how they're created etc. According to the answer over here: http://stackoverflow.com/questions/2439929/creating-a-scripting-language what I'm suppos...

Windows 7 Missing Shortnames

I noticed that if you get a Scripting.File object from certain windows files (Example: any wav in C:\Windows\Media) the Scripting.File.ShortPath property shows the long path. Curious I dropped to the command prompt and tried Dir /A /X and sure enough the short paths were missing from all the files in that directory. Anyone know: A.) Wh...

Script to download file and rename according to date on Windows Vista machine?

Hi, I need to daily run a script that will download a file from a fixed location and save it on my computer with an appropriate filename-YYYYMMDD-HHSS.ext timestamp. I need a historical record of what that file was at that particular time. I can manually check and see what the changes were, so compairson not needed. (I was looking for ...

Using VB6 + WSH with Windows Compression

Having trouble with WSH and Windows Compression. My goal is to be able to zip up files (not folders, but individual files from various locations, which I have stored in an array) using the built-in Windows Compression. I am using VB6. Here is my routine (vb6 code): Dim objShell Dim objFolder Set objShell = CreateObject("Shell.Applicat...

How can i set handler for IE mouseover event in WSH script

How can i set handler for IE mouseover event in WSH script? This code don't work. var ie = new ActiveXObject("InternetExplorer.Application"); ie.Navigate("about:blank"); ie.Visible = true; function handler() { WSH.Echo("test"); } ie.Document.onmouseover = handler; ...

How can i set handler for IE mouseover event in WSH script?

How can i set handler for IE mouseover event in WSH script? This code don't work. var ie = new ActiveXObject("InternetExplorer.Application"); ie.Navigate("about:blank"); ie.Visible = true; function handler() { WSH.Echo("test"); } ie.Document.onmouseover = handler; ...

Help with converting a Linux .bsh script to a vbs / wsh script (or other) for Windows

Hi, I have a Linux .bsh script, which I need to run on a Windows 7, and I’m having some difficulties with creating the script. I would like a script so I can run it in my cmd in windows or if the script could output to a file. The .bsh script looks as following: for ((r=0; r <$[0]; r++)) netcat localhost 4444 < $[1] $ done wait ...

Searching the Registry for a key - JavaScript

Hi All, Is there a way to search the Registry for a specific key using Windows Scripting Host? I'm using JavaScript (Jscript/VBScript?) to do so, and the msdn Library doesn't mention any such method: http://msdn.microsoft.com/en-us/library/2x3w20xf(v=VS.85).aspx Thanks, So here's an update to the problem: The problem is a bit more...

Is using the windows script host, especially the FileSystemObject hereof a good idea?

Recently I have been asked to do some maintenance on a VB6 application. This involves some file IO. I find the IO operations offered by referencing the windows script host and using the FileSystemObject a lot friendlier than the IO operations that come with VB6. But will this cause problems because of security issues, or because of the ...

Debuging VBScript in Visual Studios Express

I have read around the net that its possible to debug VBScript WSH files Visual Studios 2005 Express (I think Web Edition) but everytime I try cscript.exe myscript.vbs //X the script just executes. I have tried VS Express 2005, 2008 and 2010 all editions. I have also tried Visual Studios Premium 2010 which does infact debug scripts as ...

Using WSH (VBS) with iMacros - how do they do it?

(iMacros For Firefox 6.6.5.0; Firefox 3.6.3; Windows XP Pro SP3 w/all updates) I made an iMacro to select "load next 25" (comments) on a web page (CNN.COM). Unfortunately, iMacros doesn't appear to do looping (do the above until that string doesn't appear on the page anymore - i.e. all the comments are loaded). I tried putting {!iloop} ...

VBS / iMacros - What is error code -911

What is this error code? The link "-100...-999 (sMacroError)" on this page "http://wiki.imacros.net/Error-Codes" just reloads the SAME PAGE again. Great. I get this error when I execute this .vbs file: Option Explicit Dim iim1, iret 'initialize iMacros instance set iim1 = CreateObject ("iMacros") iret = iim1.iimInit("-fx", false)...

how can I read a binary file with in javascript (Cscript.exe)?

I think I can't read a binary file with the Scripting.FileSystemObject class. Can I do it with ADODB.Stream? Something else? I want to get an array of bytes. thanks. ...

Kill explorer.exe with windows title

Hello, I'm new with programing and my question is now, how i can close some specific explorer.exe windows. My Problem is, i have a program that call some windows: Option Explicit Dim shell, expl1, expl2, expl3, Terminate Dim uprgExplorer set shell = WScript.CreateObject("WScript.Shell") set expl1 = shell.exec("C:\WINDOWS\explore...

MSGBOX position in WSH/VBS

Hello, here is my next question and i hope some one can help me :-) Is it possible to position a msgbox in wsh/vbs? I need the msgbox everytime in the foreground. I know that how to position a inputbox, but not a msgbox. Thanks for help. Greetings, matthias ...

Ping script with loop and save in a txt

Hello, i try to make an Ping script with vbs. I need a Script, that ping (no ping limit, the program will run all the time) a computername in the network every 2 seconds and save the results in a txt file. For Example: 06/08/2010 - 13:53:22 | The Computer "..." is online 06/08/2010 - 13:53:24 | The Computer "..." is offline Now i tr...