Search the Community
Showing results for tags 'keyword'.
-
Hello, I am not sure where to start on this, but maybe some help from the community will help. I understand how to open a file and read it with autoit. My issue is this, I need to be able to select all the data on certain lines of the file by a keyword. I have a file that has multiple lines with the word "proxyAddresses:" that starts at the beginning of each line I want, there are other lines with other information I do not want. How can I select what I want and put it into an array? Example of file dn: CN=John Doe,OU=Techs,OU=Users,DC=foo,DC=bar changetype: add objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user proxyAddresses: X500:/o=FooBar/ou=Exchange Administrative Group (FYDI)/cn=Re cipients/cn=Jogn Doec52 proxyAddresses: x500:/o=ExchangeLabs/ou=Exchange Administrative Group (FYSPDLT)/cn=Rec ipients/cn=3ab8cd9xxxxxxxxxxxxxxxxxxxxxf64e0c-John Do proxyAddresses: sip:jdoe@foobar.com proxyAddresses: smtp:jdoe@foobar.mail.onmicrosoft.com proxyAddresses: SMTP:jdoe@foobar.com
-
The Code #cs Name _DefaultAnalyser() Syntax: _DefaultAnalyser($sDefault,ByRef $sParameter) Parameters: $sVariable(ByRef) :The Variable to Check/Compare $sDefault :Pass the Default Value of the Varialble which has to be set When Default Keyword or -1 is used Return Values: This Function Doesn't Return Anything Remarks: This Function Checks the Value of a Variable and Sets it to the Optional Value Whenever Default(keyword) or -1 is Detected....... Example: Check The Bottom Of The The Script Author: Phoenix XL #ce Func _DefaultAnalyser(ByRef $sVariable,$sDefault) Switch $sVariable Case Default,-1 $sVariable=$sDefault EndSwitch EndFunc #Cs - Example - Just Remove The #Cs and #Ce Func _Msgbox($sFlag,$sTitle='Hello',$sText='Testing......Successful') _DefaultAnalyser($sText,'Testing......Successful') _DefaultAnalyser($sFlag,64) _DefaultAnalyser($sTitle,'Hello') Return MsgBox($sFlag,$sTitle,$sText) EndFunc _Msgbox(Default,Default,-1) _Msgbox(-1,-1,Default) _Msgbox(-1,Default,Default) _Msgbox(Default,-1,-1) #Ce