burger Posted February 16, 2008 Share Posted February 16, 2008 Is it possible to program autoit to read input from a text file that is named on the command line following the autoit file. ie.... autoprogram.exe input1.txt, autoprogram.exe input2.txt , etc. Otherwise, is there another way to write the code so it can read input from any text file named by the user? Thanks Link to comment Share on other sites More sharing options...
James Posted February 16, 2008 Share Posted February 16, 2008 Look in the help file for, $CMDLine. Or take a look at, IconMap this allows the user to use their own file. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Zedna Posted February 16, 2008 Share Posted February 16, 2008 If $CmdLine[0] > 0 Then $name = $CmdLine[1] Else Exit EndIf $text = FileRead($name) MsgBox(0,'File content', $text) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
burger Posted February 17, 2008 Author Share Posted February 17, 2008 Thanks both of you for your replys. Link to comment Share on other sites More sharing options...
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