Forum Discussion
7 Replies
- paul_scroceFrequent Contributor
Hi Ruben
Alexei's suggestion to use Evaluate was good if you need to evaluate functions. You can use an Execute statement to call subroutines in VBscript.
http://msdn.microsoft.com/en-us/library/03t418d2(v=vs.84).aspx
Also check if the routines are in another unit.
Calling Routines and Variables Declared in Another Unit
http://support.smartbear.com/viewarticle/31618/
Paul - AlexKaras
Champion Level 2
Also, in VBScript, it is Eval() but not Evaluate() (like it is in JScript and DelphiScript). - paul_scroceFrequent Contributor
You could use the script name as a parameter something like this
vScript = "Login"
Call RunScript (vScript)
Sub RunScript (strName)
Select Case strName
Case "Login"
Call Login
End Select
End Sub
- AlexKaras
Champion Level 2
Hi Rubén,
Evaluate() function should do what you need.
Something like this:
Dim vScript
vScript = “Login”
Evaluate("Call " & vScript) - regambaNew Contributor
- Colin_McCraeCommunity HeroAs mentioned above, Eval() is what you need if you're using VBScript.
All my stuff runs in a framework and the function calls and their parameters are read in and executed as per the user defined input data using Eval(). Works fine. - regambaNew ContributorHi everybody,
I resolved the problem with the following sentrence:
project.Variables.gNombreScript = ScriptName .TestProcedure
Execute project.Variables.gNombreScript
Now, I a going to test with Eval().
Thanks for all.