hey, ... and how can I 'insert' a variable into this appleScript?
I mean, on this case, what if I want to convert an int to string to use just a line for every volume changing values?
I tried something like this:
std::string systemAppleScript; //all the script
std::string systemVolumeValueStr; //just the string for the variable value
systemVolumeValueStr = ofToString(systemVolumeValue); //systemVolumeValue is the changing value
systemAppleScript = "osascript -e \"set Volume " + systemVolumeValueStr + "\"";
cout << "systemAppleScript: " << systemAppleScript << endl;
system("systemAppleScript");
Obviously this code doesn't works because system is not receiving the content of the string. This is the console output in Xcode:
systemVolumeValue: -10.1 systemAppleScript: osascript -e "set Volume -10.1" sh: systemAppleScript: command not found