ur Posted December 14, 2015 Posted December 14, 2015 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 previouslyFunction 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.
TheSaint Posted December 14, 2015 Posted December 14, 2015 It is not clear to me at all, what you are asking, so perhaps you need to rephrase it another way ... perhaps providing a before and after. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
Jfish Posted December 14, 2015 Posted December 14, 2015 Not sure I understand either but in case you are trying to read the text between the brackets as the title suggests you could use _StringBetween in the String UDF or StringRegExp. Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now