Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.

Shell and wait

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-26-2008, 03:14 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default Shell and wait

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/official-updates/2038-door-library-beta-special-library-post11025.html

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
Attached Files
File Type: sbp ShellAndWait.sbp (788 Bytes, 190 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell and wait while process is running g0dspeed Questions (Windows Mobile) 2 03-22-2008 09:48 AM
using shell() Put Claude Questions (Windows Mobile) 2 12-26-2007 08:41 AM
Shell Wizarda2z Questions (Windows Mobile) 3 08-05-2007 07:56 AM
Shell tvrman Questions (Windows Mobile) 3 07-30-2007 01:20 PM
Wait cursor library agraham Code Samples & Tips 2 07-07-2007 02:49 PM


All times are GMT. The time now is 09:50 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0