Sign in to follow this  
Followers 0
zuccj01

How to select file to load into application?

2 posts in this topic

#1 ·  Posted

So I am pretty new to autoit. I've managed to get just about everything to work that I need, except for how to select a file to load. I have the program ask for which file to load, and now I just need to know how to take that input and select a file to load. I'm hoping that there is a way that it can click on the file. It doesn't even need to double click on it, I can send an enter afterwards to load the file in just need the file highlighted. I've tried looking around for how to do it, but just haven't been able to find anything useful online. Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted

@zuccj01 welcome to the forum. It depends on your method of input (if you could clarify that would be great). 

  • If you want the user to select a file, look at FileOpenDialog in the help file.
  • If it is a file you know will be on the hard drive in a specific location, then you can simply use a variable ($sFile = "C:\Temp\MyFile.txt")
  • If it is a file in a directory but you won't know the name exactly, you can look at _FileListToArray in the help file to list all files of type x

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

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
Sign in to follow this  
Followers 0