ddoberloh Posted May 24, 2012 Share Posted May 24, 2012 So i have a file that contains all kinds of information about a network adapter formattes something like this[stuff1]this is some stuffthis is stuff too = 12345this is more[stuff2]this is some stuffthis is more = <WHAT I NEED>more more etc.........end of filehow would i go about extracting this to a variable in auto it? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 24, 2012 Share Posted May 24, 2012 (edited) Maybe this'll work for you. In the example, $var is the second this is more, and [stuff2] is section2.IniRead Edited May 24, 2012 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
UEZ Posted May 24, 2012 Share Posted May 24, 2012 Show a real example how your file looks like. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Skitty Posted May 24, 2012 Share Posted May 24, 2012 You're probably dealing with what they call an ini file. There are script functions to get information from those. try looking into IniRead("SomeStuff","default data") Link to comment Share on other sites More sharing options...
Zedna Posted May 24, 2012 Share Posted May 24, 2012 If it's not INI file then you can use StringRegExp() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ddoberloh Posted May 24, 2012 Author Share Posted May 24, 2012 [gateway]activationkey = 0006306948189422573245type = standalone[loader]application_1 = Gateway.exeapplication_2 = Client.exeapplication_3 = discovery-server.exeapplication_4 = discovery-responder.exe[sslconf]clientkeypath = mycert[attributes]customerid = 112networkpassword = 3497398556403941gwid = 630gwuser = Gateway@company.comgwpassword = wxn4tx2bx7jrjn[TunnelServer]primarysubnet = 2001:5470:214b:0120::ptunaddress = 2001:0470:818b:0501::0120:0002secondarysubnet = 2001:0470:8135:0121::ptunsubnet = 2071:9470:813b:0001::0120ptunsubnetmask = 112primarysubnetmask = 64secondarysubnetmask = 64tunnelservertcpport = 50494tunnelserveripv4address = 143.155.782.209slash48address = 2001:0470:813b:cint = Wireless Network ConnectionThis is what my file looks like. What i need is in red. The file is a special file called a .gateway file but it opens normally as a text file. Link to comment Share on other sites More sharing options...
ddoberloh Posted May 24, 2012 Author Share Posted May 24, 2012 HEY!!! I ran it through the IniRead file and BAM worked perfectly! Thanks for all the input guys. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 24, 2012 Share Posted May 24, 2012 Glad you got it worked out. Good luck with the rest of your project! - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Zedna Posted May 24, 2012 Share Posted May 24, 2012 (edited) Remove passwords (and other sensitive data) from your posted content of the file in your previous topic. Edited May 24, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Mechaflash Posted May 24, 2012 Share Posted May 24, 2012 (edited) ZOMG FREE PASSWORDS! All your bases are belong to GUESTS Edited May 24, 2012 by mechaflash213 Skitty 1 Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
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