New topic: 

Launching an .exe and wait for it to finish. How best wait?

<http://forums.realsoftware.com/viewtopic.php?t=39806>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        Lennart          Post subject: Launching an .exe and wait for it 
to finish. How best wait?Posted: Tue Jul 12, 2011 10:24 am                      
           
Joined: Sat Apr 29, 2006 10:13 am
Posts: 232
Location: Sweden                Hi,
In XP I want my RB-program to launch an application, written by somebody else.
That application will create/update a file which my RB-program shall wait for 
and then use.
The application will exit when done.
What is good practice for such waiting?

Thanks in advance
Lennart   
                             Top                DaveS          Post subject: 
Re: Launching an .exe and wait for it to finish. How best waPosted: Tue Jul 12, 
2011 10:45 am                                 
Joined: Sun Aug 05, 2007 10:46 am
Posts: 3096
Location: San Diego, CA                a cup of coffee and a good book      
_________________
Dave Sisemore
MacPro, OSX 10.6.4 RB2009r5.1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top                DaveS          Post subject: 
Re: Launching an .exe and wait for it to finish. How best waPosted: Tue Jul 12, 
2011 10:47 am                                 
Joined: Sun Aug 05, 2007 10:46 am
Posts: 3096
Location: San Diego, CA                DaveS wrote:a cup of coffee and a good 
book

Sorry.. 

Use the properties of the SHELL (which I assume you are using)......  it can 
launch and wait.      
_________________
Dave Sisemore
MacPro, OSX 10.6.4 RB2009r5.1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top                charonn0          Post subject: 
Re: Launching an .exe and wait for it to finish. How best waPosted: Tue Jul 12, 
2011 12:22 pm                                 
Joined: Mon Apr 02, 2007 2:08 am
Posts: 484
Location: San Francisco, CA, USA                The WFS has a method called 
LaunchAndWait which takes a folderitem and launches it before calling the 
WaitForSingleObject Windows function. Be warned, however, that your entire app 
will wait (freeze) until the launched EXE exits.      
_________________
Boredom Software  
                             Top                charonn0          Post subject: 
Re: Launching an .exe and wait for it to finish. How best waPosted: Tue Jul 12, 
2011 12:24 pm                                 
Joined: Mon Apr 02, 2007 2:08 am
Posts: 484
Location: San Francisco, CA, USA                Forgot to add:

There's a function called RegisterWaitForSingleObject which waits without 
blocking your application. I haven't been able to get it to work, though.      
_________________
Boredom Software  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to