I am reading a text file and getting the functions from it.Previously the functions are in vbscript code with "Function name" and "End Function" as start and end points.And I parsed the same by setting the start and end points like below. The code in the text will be like this previously Function GetEnvironmentVariable(sType, sName)
Log "Reading " & sType & " environment variable " & sName
Dim oEnvVar
On Error Resume Next
SET oEnvVar = oShell.Environment(sType)
Log "Environment variable value: " & oEnvVar(sName)
GetEnvironmentVariable = oEnvVar(sName)
SET oEnvVar = NOTHING
End FunctionNow I need to read powershell code and the code format is as below. Function MsgBox($sMsg) { $a = new-object -comobject wscript.shell $b = $a.popup($sMsg,0,"",1) } Can anyone suggest me if the file is having somany functions and I need to read the particular function when the user requests it in my auotoit code.