jafuuu Posted August 1, 2009 Posted August 1, 2009 Hi, thanks for read (: I'm working in a Script, and I have a question: How I can get get information from other file (a *.txt,*.bat or any other files easily to modificate!) From example: I wrote in a notepad file this: Notepad.txt x=myname How I get the "x" valor from the notepad (or any other) filea and put in AutoIT? Example: MyScript.au3 ShellExecute ("(GET THE VALOR "X" FROM NOTEPAD.TXT).hi5.com") etc.. etc.. etc.. Any Ideas?, I think this is possible >_
picaxe Posted August 1, 2009 Posted August 1, 2009 How I get the "x" valor from the notepad (or any other) filea and put in AutoIT?One possible solution is to use _FileReadToArray, then StringSplit with "=" as delimiter and use the required array element to construct your ShellExecute, something likeShellExecute("any prepended text" & $aNotepadStringSplit[1] & ".any ext", "", @ScriptDir)See the help file for some good examples.
jafuuu Posted August 1, 2009 Author Posted August 1, 2009 One possible solution is to use _FileReadToArray, then StringSplit with "=" as delimiter and use the required array element to construct your ShellExecute, something likeShellExecute("any prepended text" & $aNotepadStringSplit[1] & ".any ext", "", @ScriptDir)See the help file for some good examples. Thanks for your answer, but, Can you explain me better?, whit any example, I'm so noob :$ !
Rarst Posted August 11, 2009 Posted August 11, 2009 (edited) There is very nice set of functions that works with .ini files. If you make file notepad.ini [values] x=myname Then you can get it with: IniRead("notepad.ini","values","x","") Writing is just as easy, as above - see help file. Edited August 11, 2009 by Rarst AutoIt tag at Rarst.net
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