NSearch Posted August 18, 2005 Share Posted August 18, 2005 Hello All. I have a question about cut and paste. I need to retrieve a bit of information from a flat file. The data will change each time I loop to the next file, and I know the exact position that the data will be in each time. I would like to open the file with notepad, arrow over 44 spaces and copy the next 9, and then paste the data into an input field. Does anyone know any methods that will work here? Thanks in advance. Link to comment Share on other sites More sharing options...
mikeytown2 Posted August 18, 2005 Share Posted August 18, 2005 Hello All.I have a question about cut and paste. I need to retrieve a bit of information from a flat file. The data will change each time I loop to the next file, and I know the exact position that the data will be in each time.I would like to open the file with notepad, arrow over 44 spaces and copy the next 9, and then paste the data into an input field.Does anyone know any methods that will work here?Thanks in advance.<{POST_SNAPBACK}>get SciTE and under tools there is a AU3recorder. Try that, it might to the job for ya. Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 18, 2005 Moderators Share Posted August 18, 2005 Look at StringMid() in the help file... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted August 19, 2005 Share Posted August 19, 2005 This will do the trick #include <GUIConstants.au3> GUICreate(" My GUI input ", 320,120) $input = GUICtrlCreateInput ("", 10, 35, 300, 20) $btn1 = GUICtrlCreateButton ("G&et info", 80, 75, 60, 25) $btn2 = GUICtrlCreateButton ("S&end info", 160, 75, 60, 25) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn1 $file = FileOpen("test.txt", 0) $line = FileReadLine($file) $line2 = StringTrimLeft($line, 44) $line3 = StringLeft($line2, 9) GUICtrlSetData($input, $line3) FileClose($file) Case $msg = $btn2 MsgBox (4096, "Sending", GUICtrlRead($input)) EndSelect Wend hope it helps 8) 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