doomkiller 0 Posted April 3, 2005 (edited) I nedd to be able to have my script go through a text that has a setup like this server1 server2 server3 and plug in each one in the box i tell it to using the Send() command or a simliar command and then log what happens after each one. How would i got about doing this. any help is greatly appreciated. Edited April 3, 2005 by doomkiller Share this post Link to post Share on other sites
PerryRaptor 1 Posted April 4, 2005 I would start with FileRead() and FileReadLine() Share this post Link to post Share on other sites
Kerberuz 0 Posted April 4, 2005 (edited) I would start with FileRead() and FileReadLine()<{POST_SNAPBACK}>I'd actually read the file into an array first then manipulate, It's much faster if you do it this way. Here is an example of how I would do it. I didn't add any error checking, but you would want to.I didn't understand your send question for the server though.; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: Kerberuz ; ; Script Function: ; Read from file, create combobox ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <File.au3> #include <GUIConstants.au3> Dim $aFile $i = 1 _FileReadToArray ( "Filetoread.txt", $aFile ) GUICreate("Read from file, then create a combobox"); will create a dialog box that when displayed is centered GUICtrlCreateCombo (StringReplace($aFile[1], @CR, ""), 10,10); create first item Do $aFile[$i] = StringReplace($aFile[$i], @CR, "") GUICtrlSetData(-1, $aFile[$i]); add new items that were read from file $i = $i + 1 Until $i = $aFile[0] + 1 GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WendFiletoread.txt Edited April 4, 2005 by Kerberuz Kerby Share this post Link to post Share on other sites