I am lost
-
Hello, I would like to ask a very simple question. How can I open three or so programs using a script. I would like to pause about 30 seconds between them also. I talked to some friends at work and they said to use a vbscript, which is completely forien to me. Any help would be nice. Thanks. Shades
-
Hello, I would like to ask a very simple question. How can I open three or so programs using a script. I would like to pause about 30 seconds between them also. I talked to some friends at work and they said to use a vbscript, which is completely forien to me. Any help would be nice. Thanks. Shades
Use the
ShellExecute
and a Timer to control how often the functions are called. To call theShellExecute
API add this to a module:Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long-Nick Parker
-
Hello, I would like to ask a very simple question. How can I open three or so programs using a script. I would like to pause about 30 seconds between them also. I talked to some friends at work and they said to use a vbscript, which is completely forien to me. Any help would be nice. Thanks. Shades
Using VBScript and the Windows Scripting Host, it is possible to control a variety of things through "animation" of standard Windows applications. In your case, you could do something like the following: ' myScript.vbs -- Dim wshell Set wshell = WScript.CreateObject("WSCript.shell") wshell.run "calc.exe" WScript.Sleep 30000 wshell.run "notepad.exe" Enter the commands into a file using Notepad or your favorite editor and save it with a file extension of ".VBS". Double-click on the VBS file to execute the script. On 99% of desktops equipped with IE5.5+, this will function correctly. For more information, see MSDN > Platform SDK > Tools and Scripting > Windows Script Host.