Jump to content

How to select file to load into application?


Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

@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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

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