Kill a task

Kill a task

Postby MarcoBoschi » Tue Mar 08, 2011 11:03 am

Hi,
I have to kill "Adobe Reader" that remains open after a print.


ShellExecute( 0, "print", cFile1 , "" ,"" , 0 )

In this way I obtain list of all active task

LOCAL aTasks := GetTasks()
LOCAL i
LOCAL cEleTask := ""
FOR i := 1 TO LEN(aTasks)
IF aTasks[ i ] == "Adobe Reader"

ENDIF
NEXT i
RETURN NIL

The question is: How to kill Adobe Reader?

Best regards
Marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Kill a task (SOLVED)

Postby MarcoBoschi » Tue Mar 08, 2011 1:56 pm

SendMessage( FindWindow( 0, "Adobe Reader" ), WM_CLOSE )

Many Thanks
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 70 guests