burger Posted February 16, 2008 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
James Posted February 16, 2008 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
Zedna Posted February 16, 2008 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
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