Questions etc about WinExec( <command>, <parameter&

Questions etc about WinExec( <command>, <parameter&

Postby xProgrammer » Mon Mar 10, 2008 6:23 am

Hi Antonio

I am using WinExec() to print postscript files, with calls like this:

WinExec( "lpr", <postscript-file> )

That works fine. But I don't want to clutter up computers with the postscript files. So the logical thing is to erase them. But I am assuming that WinExec() operates asynchronously - in other words the next line of (x)Harbour code may be executed before lpr has finished spooling the postscript file? Is this the case? Can WinExec() be made to optionally operate synchronously and return the exit code of whatever it calls? What alternatives are there? I guess calling a shellscript that spools the postscript file and then deletes it? I could insert a MsgInfo() informing the user that a file has been spooled and hope that that would provide sufficient time delay for the file to have already been spooled.

If you do look at WinExec, please see if you can modify it so that you can use more than 1 parameter.

Thanks
Doug
(xProgrammer)
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia


Re: Questions etc about WinExec( <command>, <parame

Postby Enrico Maria Giordano » Mon Mar 10, 2008 10:29 am

Ops! I missed the Linux topic again, sorry. :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 1 guest