Questions tagged [vbscript]

VBScript is Microsoft's Visual Basic Scripting runtime.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

QTP/UFT Prints the time in takes to complete every task in a Log using VBScript

This script is meant to log the time it takes to complete functions in order to find the locations where performance could be improved in QTP. If a duplicate log is attempted, the script changes the ...
4
votes
0answers
794 views

Multithreaded Excel + VBScript Timer: Snake Game Demo

Multithreaded Excel + VBScript Timer After reviewing these post: Snake in Excel in… VBA? and Drawing a snake using arrow keys in Excel using VBA, I decided to work on creating a VBA Timer. The ...
2
votes
0answers
25 views

Store history data using customization features of a profesionnal software

Context My company uses a system that has access to the state of different items in the plant. This software can be customized, by executing a single VBScript function, at a given interval. The ...
3
votes
2answers
84 views

Comparison of excel files, cell by cell

below is the code that i created as a POC towards an implementation for 2 excel file comparison (cell by cell) This was just to test the logic, which works as expected, however i found out that for ...
3
votes
0answers
279 views

Recursive function to compare XML files using MSXML DOM

I have put together this function which compares two XMLs. On debugging, I found out that there are lot of useless loops which might cause performance problems for me if the files to compare are very ...
6
votes
0answers
99 views

Script for gathering information on computers getting stolen

I have put together a small VBScript to gather a bunch of information and email at scheduled intervals, so that one day, should it happen, and my computers are stolen, I may be able to provide ...
2
votes
1answer
383 views

VBs to query AD

I'm trying to get authentication with AD and to do this I've already made this code. Can anyone provide me if it's correct or not to do this or if I have a better solution. ...
4
votes
1answer
369 views

Count bits in VBScript

I'm trying to write a function that returns the number of bits set in a 32-bit integer in VBScript, it's just for practising the language. The function I've written so far looks okay, but I'm ...
4
votes
2answers
1k views

VBA copy paste loop

I have 2 Excel files: the first is the source file "Practice_New.xlsx" and the second is a mapping file "A_File.xlsx". A_File is a mapping file which contains cell reference of the source file ("...
5
votes
0answers
93 views

Counting instances of a string in a binary / unicode file using regex [closed]

(Originally posted on Stack Overflow) I need to run through a number of bespoke files (I'm unsure if they are unicode / ascii or binary so have attached a snapshot through notepad++). I'd like to ...
5
votes
1answer
2k views

Web scraping VBA and VB Script

I am working on a project on VBA where the objective is to have a "program" that fetches rates from a website called X-Rates, and outputs to excel the monthly averages of a chosen country. Initially ...
4
votes
1answer
112 views

Making a script file to perform maintenance

I wish to make a file to click on to do the 'usual' tasks I would do to clean/perform maintenance on my mother's computer when I'm not present. I made a script file and took a few command lines from ...
2
votes
0answers
88 views

Command line VBScript spam bot

I have made a simple program that, given a string and how many times to repeat it, it waits a second and types that string N times, followed by an enter key. It is made for applications like skype. ...
10
votes
1answer
270 views

Loading text into an array when fields are in random order

This script reads records from a CSV file of customer names and addresses. The first record of the file is the header (field names); the fields could be in any order, and sometimes have different ...
2
votes
0answers
497 views

VBscript XLS-to-CSV with minor transform

I have a system that only outputs reports in Excel 97-2003, and a second system (for the user to look at) that only accepts these reports in CSV format. The reports manager was previously opening ...
1
vote
0answers
56 views

Advertising campaign script

A merchant creates an advertising campaign with (let's say) a total budget of £100. He then adds products to his advertising campaign with the option to set his own Cost-Per-Click (default £0.01); the ...
9
votes
3answers
1k views

Login using VBScript

I was tasked with re-writing a login VBScript we use on about 50 machines. The original script was hacked together by someone who clearly had no idea what they were doing (multiple lines that ...
8
votes
1answer
4k views

PowerShell within HTA

I've put some code together that helps me search an internal ticket system using an HTA application with some TextBoxes and some embedded VBScript that runs PowerShell scripts. The PowerShell scripts ...
3
votes
1answer
380 views

Checking if a remote server is online

I have this vbs file to check if a remote server is accessible. Can I simplify or refactor to make it more robust/efficient? ...
4
votes
1answer
134 views

Proper capitalization for surname like McDonald

I am using the code below to capitalize a string properly. I would like to know if there is a better way to code the surname portion, as the way it stands now can become very bloated depending on how ...
3
votes
2answers
336 views

Capitalize string except for conjunction words

I am using the code below to capitalize words in a string. I do not want conjunction words capitalized, but always want the first character in the string to be capitalized no matter what the word is. ...
4
votes
2answers
228 views

Still pulling information from XML to insert into Word Document inside 3rd party application

Follow up to This Question I took some very good advice and changed my code around a little bit and eliminated some If statements. I am not retrieving very much ...
6
votes
1answer
77 views

Pulling information from XML to insert into Word Document inside 3rd party application

This is code written for use inside a 3rd party application to pull information from an XML and insert into a word document, I don't know all the mechanics of the fun process of inserting the ...
5
votes
2answers
108 views

Extracting information and returning specific data

The purpose of this code is to return an address for one of the seven judicial circuits for the cases that is passed into the function. I am taking a Node ID, which is a 3-digit number the circuit ...
2
votes
2answers
841 views

pulling specific data from XML from inside 3rd party application

Another script that is used as a token to extract information from a 3rd party application, the application does other things in the background that I don't specifically know about. This code does ...
5
votes
1answer
301 views

My script is about as scary as the XML it's reading

This was a revision, made when the code failed after an update (at least that is what I think happened). So I fixed it and now it works, but I think that this code can be written better and more ...
7
votes
1answer
1k views

Extracting data from a Word document is too slow

I have a 100page long .docx format document. I'm using a macro written in VBS to extract some information and then just generate a table from them. I iterate through the paragraphs and store the ...
4
votes
1answer
190 views

VBScript for AD account creation

Does the following code look okay? Want to see if anyone can spot any mistakes I may have made. This will be pulling from a pre-formatted Excel document - I have already specified all needed Cell ...
5
votes
2answers
204 views

How to tell the NPC what hand it has?

Posted my question here. Here is the full code: ...
4
votes
1answer
69 views

Power utility for starting processes

I was looking for a way to start elevated (i.e. administrator permissions) and/or invisible processes via batch in Windows. It turns out that this is kind of impossible with batch only, so I googled ...
5
votes
2answers
1k views

VbScript/ASP Classic good OOP Pattern

I have to create a website in Classic ASP, and I really want to do a clean design so I will try to put everything in Classes and Models to emulate the ViewModel Pattern. So can you tell me if this ...
7
votes
2answers
2k views

Check if an XML file exists then change URLs in it

This is my first VBScript I have ever written and I would like to know if there is any obvious blunders in the code. All the code should do is check if file exists then change the Yahoo URL to the ...
8
votes
2answers
2k views

Is there a more efficient way to do Base 32 encoding/decoding than this?

This journey started with a quest to create the shortest possible case-insensitive verification number. Based on the answers there, I worked out a Classic ASP/VBScript implementation of Crockford's ...
3
votes
3answers
312 views

Trying to speed up a report that takes freaking forever

I'll try to keep this as short as I can without losing context - we have a system for online education, where presentations often have a test. Management has access to a report used for measuring ...