[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VBScript - WaitForSingleObject

Posted on 2007-11-20
1
Medium Priority
?
1,610 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 38

Accepted Solution

by:
PaulHews earned 2000 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

Technology Partners: 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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

656 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