vbscript

Unicode, VBScript and HTML

Hi all, I have the following radio box: <input type="radio" value="&#39321;">&#39321;</input> As you can see, the value is unicode. It represents the following Chinese character: 香 So far so good. I have a VBScript that reads the value of that particular radio button and saves it into a variable. When I display the content with a mes...

How can I open an HTML file as a text file to read the code using VBScript?

I have a lot of HTML pages that need the same few lines of text changed on them. To reduce the time it will take to manually open each one in Notepad and find the text and replace it with the new text, I would like to create a script to do this for me. How can I open an HTML file, read the code the makes up the page and find & replace t...

Starting a Firefoxprofile in a startupscript?

How do you start a Firefox-profile in a startupscript? This want do: Set shell = CreateObject("WScript.Shell") progList = Array("C:\Program Files\Mozilla Firefox\firefox.exe" -P "PrimaryNew" -no-remote") For Each prog in progList 'WScript.Echo "File Name: " & prog shell.run """" & prog & """", 1, false WScript.sleep 1000...

How do I pause VBS script while folder is deleted?

I'm writing a VBScript for SyncBack (backup utility) in which I am deleting old versions of a backup. '' # if current version is greater than the total allowed number of versions, '' # delete the oldest folder If versionNumber > totalVersions Then delDirNum = versionNumber - totalVersions If delDirNum > 0 Then DelFoldername...

What approach should I use to test a VBScript?

I've been asked to help out with a project which has made extensive use of VBScript to process a whole bunch of text files and generate certain outputs - sanitized files, SQL entries etc.. The script is going to be scheduled to run as a Scheduled Task with operation based on the parameters passed to the script. There's no user interfac...

Clicking on a link that contains a certain string in VBS

Hi! I'm trying to run an automated vbs script that clicks on a link on a page. I have things of the form: Const READYSTATE_COMPLETE = 4 Set IE = CreateObject("INTERNETEXPLORER.APPLICATION") IE.Visible = true IE.navigate ("http://mywebpage.com") How do I then make it click on a link on that page that doesn't have an ID but is lik...

How can I run an RDP file with VBScript?

So far I have: Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run("""C:\Server01.rdp""") But when I run it, nothing happens. Is it even possible to run an RDP file with VBScript? If so, then what am I doing wrong? ...

Retrieve all users from Active Directory (LDAP) using VBScript

How can I retrieve all users from Active Directory using VBScript? ...

vbscript How do I find "-" in a string and place characters that follow in a new string?

Hi all, I'm using vbscript, how do I find the hyphen character "-" in a string and place characters that follow in a new string? Basically my computer names end with a room number PC1-3 (room 3) , PC1-4 (room 4) etc I'm using Dim roomArray(2) roomArray = Array("-1", "-2", "-3") Dim item For each item in roomArray If instr(strCom...

How to terminate a process in vbscript

Hi, How can I terminate process using vbscript. PLEASE NOTE, I need to terminate process that runs under windows 64-bit environment as native 64 (not using select * from win_32_Process) Thanks, ...

VBScript “Export to Microsoft Excel” in IE6

When right-licking on a HTML page in IE6 (our company standard), there is an option "Export to Microsoft Excel". Can this option be fired via embedded VBScript? ...

Asp website with vbsript functioning differently on different servers

Hi there, I am currently trying to move a web site from one server to another, one of the asp pages contains some vb script that looks like this: Dim oSearch 'AS Object Dim strXML 'AS String Dim strXSL 'AS String Dim oRS 'AS ADODB.RecordSet Set oSearch = Server.CreateObject("ETHERNET_PL.CETHERNET_PL") strXSL = Server.MapPath("...

javascript vbscript convert from rtf to html

Hi, Does anyone know of any vbscript / javascript implementations of a RTF to HTML converter? I have seen some in VB / c#, but cannot find any reference to a scripted version. Before I start to write one - does anyone know of an existing open source project that deals with this? Many thanks, Franko ...

Running vbscript from WPF's WebBrowser

I have a WPF window that is hosting WebBrowser control. The Web page showing up has vbscript that is loaded when the Html's Body onload event It doesn't work for me, so I am calling the script with the code using _webBrowsercontorl.InvokeScript("scriptName") but that even doesn't work. Any idea? ...

CDO.Message - "The transport failed to connect to the server."

I'm working on a Classic ASP & Vbscript site that uses CDO.Message to send email in a function. I'm running into trouble with this function and am recieving the error, CDO.Message.1 error '80040213' The transport failed to connect to the server. I believe it has to do with the SMTP authentication settings and the shared host we are r...

Exchange 2003 scripting. Need to find emails from mailbox between particular dates

Hi , I am looking for VBscript for searching through a set of mail boxes on an exchg 2003 server. I could get through to the point of finding the message count. How can i loop through all the mails of mailbox? What object to use? Regards Richard J P.S. i have got all the necessary access rights to the mailboxes ...

VBScript: Function parameter list too long?

in VBScript, I've got a function like: Function InsertPerson(FirstName, LastName, Street1, Street2, City, State, Zip, x, y, z, a, b, c, d, e) When I try to compile this function, I get an "Identifier Expected" error. However, if I shorten the list of parameters, it works fine. Is there such a thing as TOO long a list of parameters? ...

ASP Classic - Include VBScript page in a JavaScript page?

Hello, Is there a way to include a VBScript page into an ASP page written using Javascript? There is an ASP page written in Javascript, but our sidebar menu is written in VBScript. When I include the sidebar asp file into the Javascript the server gives an error. < %@ LANGUAGE="JavaScript" %> <% ... < !--#include file="sidebar.asp...

Scheduled task error

I am getting error in scheduled task :"http://localhost:4625/DataUpdater.aspx.Error Message:Object reference not set to an instance of an object." Scheduledtask vbs script : Call LogEntry() Sub LogEntry() On Error Resume Next Dim objRequest Dim URL Set objRequest = CreateObject("Microsoft.XMLHTTP") URL = "...

excel macro to save as filename excel file and close open excel file

how to add a step at the end of an excel macro to save the processed excel file with name finaloutput.xls in given path on computer and then automatically close the active excel file without saving changes. ...