Thursday, April 11, 2013

How to call a function in one action from another action

By passing the function name with parameters as Input parameters


Following is the script in my "Action1"
RunAction "LibraryAction",0,"displayMsg(3)"
FuncReturnVal = RunAction ("LibraryAction", oneIteration, "sum 5,6,7,8")
msgbox FuncReturnVal

Create a New action called "LibraryAction", can created an input parameter call "function" of type string
Following is the script in my second action "LibraryAction"

func = Parameter("function")
Execute func
Public function displayMsg(str)
msgbox(str)
End Function

Function sum(a,b,c,d)
temp=a+b+c+d
exitAction(temp)
End Function

No comments:

Post a Comment