Solved

VBScript - WaitForSingleObject

Posted on 2007-11-20
1
1,538 Views
Last Modified: 2012-05-05
Hi,

I am looking for a working example in VBScript to use the API waitforsingleobject.  I have working code for this in VB6 but need this for VBScript as well.  

Thanks.
0
Comment
Question by:1500orion
1 Comment
 
LVL 38

Accepted Solution

by:
PaulHews earned 500 total points
ID: 20320656
You cannot call the API from vbscript.  However, you can shell and wait for a process to return:


http://msdn2.microsoft.com/en-us/library/d5fk67ky.aspx
Set WshShell = WScript.CreateObject("WScript.Shell")
 
Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, true)  'True parameter specifies to wait for return

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question