_ note for some reason phpbb isn’t letting me type system with a ( ), perhaps it’s a php issue? so I have added a space below between system and ( )_
hi -
I’m not on a mac, so I have to guess, but I think you could do this with this call:
system (".....");
we’ve actually implemented it in 0.03 for loading urls in browsers, but you can do all kinds of stuff with it (basically anything from the command line) like play mp3s, run scripts, etc.
I can’t test the mac, but I think this could work (and put your computer to sleep…)
system ("osascript -e 'tell app "Finder" to sleep'");
I’m now able to send whatever I want to GE, but I’m stuck on getting values back. When I make a request for something in Applescript to return a value, it comes up in the run log (ie. if I do system (“ls -l”) it returns the directory listing in the run log).
So now I’m wondering how to redirect that info back into my OFW application. Would that be something to do with redirecting the output stream? Something with pipes? or an exec () call? :?
hey, … and how can I ‘insert’ a variable into an appleScript?
I mean, what if I want to convert an int to string to use it inside the script or just like a line for every volume changing values?
systemVolumeValueStr = ofToString(systemVolumeValue); //systemVolumeValue is the changing value
systemAppleScript = "osascript -e \"set Volume " + systemVolumeValueStr + "\"";