|
|
|
|
Functions
Events
Variables
Libraries
|
|
Syntax
Parameters
| STRING | Command | MioScript code |
Return value
No value is returned.
Description
Call a MioScript function defined with the prefix public:, as shown in the example below.
This function cannot be used to execute directly a MioScript code. A function must be defined in a MioScript code page and sendToMio can be used to call it.
The ID of the browser from where the function was called can be retreive with the variable &commandAuthor.
Your function can callback a javaScript function with parameters to pass values to your JavaScript code, as shown in the example below.
In the following example, a MioScript function myOwnFunction is called from JavaScript. |
JavaScript Sample Code
// --- MIOSCRIPT code (in a .k file) ---
// A public MioScript function is defined with the prefix public
function.public:myOwnFunction(&arg)
alert(&arg)
// Callback a javaScript function with a value
&returnValue="I'm MioScript"
browser.&commandAuthor.execScript("myFunction("&returnValue")")
function.end
// --- JAVASCRIPT code (in a .htm file) ---
sendToMio("myOwnFunction=who are you?")
function myFunction(value) {
alert("Value from MioScript: "+value)
} |
|
|
|