- Home /
Returning from and waiting for a Message function
Hi,
I have a function called PHPCall() that uses WWW(URL, form) to execute a php file and get its output. This function should be available from anywhere in the program, so I have put it in a script that listens to the message "phpCall":
GlobalFunctions.js --
function Start(){ Messenger.instance.Listen("phpCall", this); }
function _PHPCall(msg:MessagePHPCall){ // Retrieve php output with WWW() and yield // Somehow return this output }
This function can be called from anywhere in the system with the following command:
new MessagePHPCall(parameters);
through a message that passes parameters to GlobalFunctions.js with super("phpCall");
Is there a way to return the php output back to the script that made the message call easily? And is it possible to wait for (yield) the MessagePHPCall, so it pauses the script until it has recieved the php output?
/ Thanks
Your answer
Follow this Question
Related Questions
Showing and hiding guiText after a key is pressed -1 Answers
WaitForSeconds not running 2 Answers
How to use Coroutines in C++/CLI? 1 Answer