Alan1234

How to Pass Text to AutoIt Script

4 posts in this topic

I have and AutoIt script exe file.  I want to pass a number in a notepad text file to a compiled AutoIt script file it can perform a calculation.s  Being new to AutoIt scripting I cannot figure out how to do this.  Can someone show me how to do this?  Thanks in advance...

Share this post


Link to post
Share on other sites



@Alan1234 welcome to the forum. There are a couple of different ways you could accomplish this (as with most things AutoIt). Probably the easiest would be to have your script call fileread in a variable, and use that variable for your calculations. The help file section on FileRead has a nice example.

Try the example out on your own and see how it fits for your needs. If you run into problems, post your script here and we will do our best to assist :)

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

JLogan3o13 - Thanks for the help and the quick response.  I ran the example file you suggested and studied the script.  I then wrote the attached simple script to do what I wanted to accomplish and ran it.  It works.  Is the script too simple, too amateurish ?  What recommendations would you suggest?  Thanks!

file read2.au3

message

Share this post


Link to post
Share on other sites

It's a good start. You don't need to include WinAPIFiles.au3, so you can delete line #13. :)

Share this post


Link to post
Share on other sites

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