![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Code Samples & Tips Share your recent discoveries and ideas with other users. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
The following code allows you to run an external application and wait for it to finish (unlike regular Shell which continues to run immediately).
It requires the Door library: http://www.basic4ppc.com/forum/showthread.php?p=11025 Code:
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
'Initialize objects
process.New1(false)
process.CreateNew("System.Diagnostics.Process" & process.System_NS)
StartInfo.New1(false)
StartInfo.Value = process.GetProperty("StartInfo")
'Usage
ShellAndWait("iexplore","www.basic4ppc.com")
Msgbox("After Shell")
End Sub
Sub ShellAndWait(File, Arguments)
StartInfo.SetProperty("FileName",File)
StartInfo.SetProperty("Arguments",arguments)
process.RunMethod("Start")
process.RunMethod("WaitForExit")
process.RunMethod("Close")
End Sub
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell and wait while process is running | g0dspeed | Questions & Help Needed | 2 | 03-22-2008 09:48 AM |
| using shell() | Put Claude | Questions & Help Needed | 2 | 12-26-2007 08:41 AM |
| Shell | Wizarda2z | Questions & Help Needed | 3 | 08-05-2007 07:56 AM |
| Shell | tvrman | Questions & Help Needed | 3 | 07-30-2007 01:20 PM |
| Wait cursor library | agraham | Code Samples & Tips | 2 | 07-07-2007 02:49 PM |