Re: Win32Lib: how run another program?

new topic     » goto parent     » topic index » view thread      » older message » newer message

> Here's what I
> > found that apparently does it:
> >
> >         result = system_exec( "exw \"" & fName & "\"", 2 )
> >
> > what I specifically don't understand is the "exw\" & the "\" & the 2
> > <sickly grin>
>
> What i'd like to know is: does windoze start fName and come
> right back to the next
> line after that, leaving fName to go on about it's business
> as a standalone application?

Win32Lib wraps the API function ShellExecute, which, technically, is a
function (if I could get it to work properly).  However, one of the quirks
of C, which Windows is written in, is that you are free to ignore the return
value of a function, so instead of:

linkFunc(), use linkProc()

Using the former would cause your program to wait until the app is closed
(this is how system_exec works), and the latter should behave as you (and I)
would like.  Maybe Rob could implement an offshoot of system_exec that does
this?  I've tried using system(), but it looks like Word opens up and
immediately closes.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu