vbscript

Displaying Powerpoint slides on second monitor non-sequentially using VBScript

If a Powerpoint presentation is not currently displayed - how can I display (for example) slide 7 of 10 on the secondary monitor, using vbscript? ...

Is there a way to collapse functions and sub-routines for Classic ASP in Visual Studio 2008?

Is there a way to enabling collapsing of functions and sub-routines for Classic ASP in Visual Studio 2008? I'm able to manually go through and specify blocks of code as collapsable, but it would save me a lot of time if there was a way to automatically do this. Otherwise, is there another IDE or text editor that you can think of that s...

How do I check if my workstation is locked ?

HI, Can anyone help with code snippet for checking if the workstation is locked? I tried with getting the document.title, so that when the workstation is locked it returns blank for document.title. This is not working. I am encoding wscript in vbscript which is residing in hmtl. Any help with Javascript is also fine. rgds -SHK ...

Text file to array using VBScript and ";" seperator.

I have a rather large list of data that contains 5 properties per element. The elements are separated by a ";". I want to read the elements into an array in VBScript. Seems simple enough to search for this on the big G but all clear examples assume you want to read line by line and then split the contents on a line on a ";" character. I ...

What can we do about a randomly crashing app without source code?

I am trying to help a client with a problem, but I am running out of ideas. They have a custom, written in house application that runs on a schedule, but it crashes. I don't know how long it has been like this, so I don't think I can trace the crashes back to any particular software updates. The most unfortunate part is there is no longe...

Import VBScript General Date Time Into MS Access Date/Time Column

Setup I have a VBScript for driving the stress testing of a web service. The script creates a data file of measurements, with each record timestamped with a general date/time: FormatDateTime(Now(), 0) This creates dates like mm/dd/yyyy hh:mm:ss [AM|PM] I need to import this data file into a MS-Access 2003 database. The table in th...

ASP to ASP.NET Helper Functions

I'm looking at converting a web site from classic ASP to ASP.NET. I'm thinking of doing an agile style approach and providing deliverables as quickly as possible and so am thinking of doing a line by line conversion and creating "bad" ASP.NET and have it all in the ASPX file for phase 1 and get that working. That, I figure, will be the f...

Automatically generate MD5 and display.

On a page that automatically lists several small files (~100-500kb) that are contained in a specific folder, is there a way using VBScript to automatically generate MD5 hashes of each file and display it on the page? Cliff notes: Can I generate an MD5 hash of a file on the server machine? ...

Is there a log4j equivalent for VBScript?

I need to instrument a series of .wsf and .vbs files with debug statements; before I go off and roll my own, does something like log4j exist for WSF/VBScript? ...

Why is modulus different in different programming languages?

Perl print 2 % -18; --> -16 Tcl puts [expr {2 % -18}] --> -16 but VBScript wscript.echo 2 mod -18 --> 2 Why the difference? ...

vbscript / Classic ASP - Is there any way to get your own file name programmatically?

I was just reviewing some old code and found the following (inside foo.asp): Const ASP_FILENAME = "foo.asp" ' TODO: Update this to the name of this file (if changed) The variable is only used for logging errors. (ie. "Error in foo.asp - Could not create xxxxx object.") Is there any way to avoid this? Thanks! ...

Need help removing ";" separator from items within an array, VBscript

My code is pulling from a data cells that lists multiple file paths and use semicolons " ; " as the separator. After spliting the data and placing it into an array, I need to remove the semicolons. otherwise my file paths are invalid when they enter the loop. To clarify: My code works when there is only one file path in the data cell...

Overload constructors in VBScript

I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object. This is my sample class: Class Test Private strText Public Property Get Text ...

Is it better to use properties in the child class to access the parent, or make the parent public?

I have 2 classes, a parent and a child. Class Test Private Test_Text Private Sub Class_Initialize() Test_Text = "Hello" End Sub Private Sub Class_Terminate() End Sub Public Property Get Text Text = Test_Text End Property Public Property Let Text(ByVal strIn) Test_Text = strI...

Calling VBScript from JavaScript or vice versa?

Is it possible to call a VBScript function from a JavaScript call, or alternately call JavaScript from a VBScript call? ...

Convert string to uniqueidentifier in VBScript

...

VBScript Tutorials / Reference

I'm trying to write a script in VB, but I'm not finding any good tutorials or references to start from. It's something relatively simple (playing a song whenever it reaches a certain time), but most of the stuff that I'm finding is more geared towards embedding the scripts into webpages. Do you have any suggestions for some good refere...

vbscript : unexpected identifier

In my code I get the following error message c:\dpdata_copy2.vbs(114,13) Microsoft VBScript compilation error: Expected identifier line 114 points to a blank line so I assuemd it was throwing an error at the following line: Lastprop = f.DateLastModified in the code strComputer = "." Set objWMIService = GetObject("winmgmts...

VBScript: way to check why the script stopped?

I have this VBScript which runs however, while it is processing, it will randomly stop and require a user to hit the spacebar for it to display the rest of its ongoing output. How do I figure out why this is happening? Here is a copy of the script: 'On Error Resume Next Dim arrFolders() intSize = 0 Function StampNow() Dim Hr, Mn, Yr...

unable to register 3rd party dll

I am new to usage of objects in HTML esp dlls I need to use a 3rd party dll in my html page for which I need the classid which was not provided to me. I have tried using the following command to generate the type library and register it. "regasm XXXXXXXX.dll /register /tlb" After I am done with the above statement, I have used oleview...