hitsoncd Posted August 29, 2017 Share Posted August 29, 2017 Why isn't this script working guys? #include <Array.au3> #include <File.au3> Local $aInput $file = "8 letter words.txt" _FileReadToArray($file, $aInput) For $i = Random 1,27852,1 ($aInput) -1 send (0,'',$aInput[$i]) Next Link to comment Share on other sites More sharing options...
VAN0 Posted August 29, 2017 Share Posted August 29, 2017 perhaps try "msgbox" instead of "send"... Link to comment Share on other sites More sharing options...
hitsoncd Posted August 29, 2017 Author Share Posted August 29, 2017 I still don't think it will work because it is the random that is making it not load. Link to comment Share on other sites More sharing options...
hitsoncd Posted August 29, 2017 Author Share Posted August 29, 2017 #include <Array.au3> #include <File.au3> Local $aInput $file = "8 letter words.txt" _FileReadToArray($file, $aInput) For $i = Random 1,27852,1 ($aInput) -1 msgbox (0,'',$aInput[$i]) Next It still crashes out before loading Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 30, 2017 Moderators Share Posted August 30, 2017 Three things I see at a glance: You are using Random incorrectly; the parameters are not enclosed in (). Look at the help file for Random to see how it should be written. Your For loop is wrong - the syntax is For $i = x to y: you are missing the To. _FileReadToArray returns an array with the length at index 0. So rather than For $i = 1 to ($aInput) - 1 (which should be For $i = 1 to Ubound($aInput) - 1), you would simply do For $i = 1 to $aInput[0] "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 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