Function Exec (funcName, arr, byResult ){
If (byResult ){
If (typeof funcName = "string "){
If (window [funcName]) {
// If false is returned or no return value is returned, the execution will continue once, knowing that true is returned.
If (! Window [funcName] (arr )){
Window. setTimeout (function () {Exec (funcName, arr, true)}, _ interval );
}
}
Else {
Window. setTimeout (function () {Exec (funcName, arr, true)}, _ interval );
}
} Else {
If (! FuncName (arr )){
Window. setTimeout (function () {Exec (funcName, arr, true)}, _ interval );
}
}
} Else {
If (typeof funcName = "string "){
// If this function has been loaded
If (window [funcName]) {
Window [funcName] (arr );
} // If the function is not loaded, check every 0.1 seconds until the loading is complete.
Else {
Window. setTimeout (function () {Exec (funcName, arr)}, _ interval );
}
} Else {
FuncName (arr );
}
}
}
Function Exec2 (funcName, arr, byResult ){
If (typeof funcName = "string "){
If (window [funcName]) {
If (byResult ){
If (! Window [funcName] (arr )){
Window. setTimeout (function () {Exec (funcName, arr, true)}, _ interval );
}
} Else {
Window [funcName] (arr );
}
}
Else {
Window. setTimeout (function () {Exec (funcName, arr, byResult)}, _ interval );
}
} Else {
If (byResult ){
If (! FuncName (arr )){
Window. setTimeout (function () {Exec (funcName, arr, true)}, _ interval );
}
} Else {
FuncName (arr );
}
}
}