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;
}