Solved

VBScript - WaitForSingleObject

Posted on 2007-11-20
1
1,550 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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