EricDLundquist 0 Newbie Poster

Currently I'm using the way posted below which works but it sure isn't elegant. Can anyone think of a way to test if the UI has loaded without using system() or popen() in c++

FILE * fp;
	char inputArray[100];
	 fp = popen("ps aux | grep  SystemUIServer | grep Library | awk '{print $11}'", "r+");
	
	
	while (fgets(inputArray,sizeof,inputArray, fp)){
	
	}
	
	
	
	stringstream UIConv;
	UIConv << inputArray;
	UIDidLoad = UIConv.str();
	
	
	
	
	if ( UIDidLoad != "/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer\n"){
		
		
		return 1;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.