doomkiller Posted April 3, 2005 Share 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 Link to comment Share on other sites More sharing options...
PerryRaptor Posted April 4, 2005 Share Posted April 4, 2005 I would start with FileRead() and FileReadLine() Link to comment Share on other sites More sharing options...
Kerberuz Posted April 4, 2005 Share 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 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