Re: Returning values from Main-thread
Posted: Thu Jul 05, 2018 7:44 am
Hi,
You can try splitting your function in 2.
Disable the GUI while it's calculated if you don't want user interference.
When the result is ready, the main process would only have to call the second JavaScript function with the result as the function parameter with a simple :
You can try splitting your function in 2.
- First half would have everything up until SendProcessMessage(PID_BROWSER, msg) is sent.
- The second half would have everything else. This function should also have a parameter with the result calculated in the main process.
Disable the GUI while it's calculated if you don't want user interference.
When the result is ready, the main process would only have to call the second JavaScript function with the result as the function parameter with a simple :
Code: Select all
TChromium.ExecuteJavaScript('SecondFunction(MainProcessResult)', 'about:blank');