Jump to content

How I can do this?


Recommended Posts

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 >_

Link to comment
Share on other sites

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 like
ShellExecute("any prepended text" & $aNotepadStringSplit[1] & ".any ext", "", @ScriptDir)
See the help file for some good examples.
Link to comment
Share on other sites

One possible solution is to use _FileReadToArray, then StringSplit with "=" as delimiter and use the required array element to construct your ShellExecute, something like

ShellExecute("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 :$ !

Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...