Things Posted October 23, 2011 Share Posted October 23, 2011 (edited) Hi, new to Autoit, but thanks to the forums I've already got a little program scripted to submit forms for me! One question I have though, and I'm not too sure about, is I want to fill one of the forms with data from a txt file. The issue is, the data in the file is all just bunched together, separated by a space. Example: 23/10/11 17:35:28 26.3 69 20.2 7.2 11.2 180 0.0 0.0 1012.5 S 2 km/h C hPa mm 94.6 +0.2 29.1 2407.1 13.5 24.4 62 26.3 -1.5 31.8 11:26 26.2 17:13 23.4 12:59 36.7 11:17 1016.1 09:13 1011.4 15:15 1.9.2 1018 19.4 26.3 33.8 1.0 4804.1 37 165 0.0 2 1 0 SSE 762 m 28.7 11.9 114 1 Every space is a new chunk of data. So I'm wondering, how would I go about reading this file and all it's data into separate "array" values(Not quite sure how Autoit arrays work yet)? For example: $array[0] = 23/10/11 $array[1] = 17:35:28 $array[2] = 26.3 etc .. So then when it comes to filling in the forums, I can use something like: _IEFormElementSetValue ($oForm2, "Here is the current data:" & $array[$0] & $array[$1]) And insert the values? Thanks Edited October 23, 2011 by Things Link to comment Share on other sites More sharing options...
DesireDenied Posted October 23, 2011 Share Posted October 23, 2011 Use StringSplit? Link to comment Share on other sites More sharing options...
Things Posted October 23, 2011 Author Share Posted October 23, 2011 Thanks, though getting the file "into" autoit is where I'm lost. Do I use IniRead or? Link to comment Share on other sites More sharing options...
Things Posted October 23, 2011 Author Share Posted October 23, 2011 OK, I've managed to figure out out Autoit seems much easier to code in terms of string manipulation than many other languages I've used! 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