2013-05-18 102 views
1

我使用NSTask啓動應用程序並使用NSPipe獲取它的stdout和stderr。我想在啓動時隱藏它(GUI),因爲應用程序只是執行一些命令並退出。我不能使用NSWorkspace,因爲我需要stdout/stderr。有誰知道一種方法來實現這一目標?使用NSTask調用時隱藏啓動時的應用程序

+0

正在啓動的是*您*必須對代碼的應用程序的應用程序,或者是一些其他的應用程序,您(或用戶)購買和安裝? –

+0

用戶安裝的一些其他應用程序。 –

回答

0
/* 
* TransformProcessType() 
* 
* Summary: 
* Changes the 'type' of the process specified in the psn parameter. 
*  The type is specified in the transformState parameter. 
* 
* Discussion: 
* Given a psn for an application, this call transforms that 
* application into the given type. Foreground applications have a 
* menu bar and appear in the Dock. Background applications do not 
* appear in the Dock, do not have a menu bar (and should not have 

....

這是我在做什麼

相關問題