kizman Posted September 30, 2008 Share Posted September 30, 2008 (edited) Whats the best way to make a script that reads 2 files LINE BY LINE: One.txt Two.txt Replaces certain data in index.html with data from one.txt and two.txt Then opens the html file. ( The html file contains a form that auto-submits) And restarts over until the last line is reached. (Both files contain same amount of lines in this case 444) If example code is provided I WILL learn from it. This is highly appreciated. Example READ LINE 1 ONE.TXT READ LINE 1 TWO.TXT OPEN INDEX.HTML REPLACE <STUFF> WITH LINE 1 FROM ONE.TXT REPLACE <STUFF2> WITH LINE 1 FROM TWO.TXT OPEN INDEX.HTML SLEEP 10 SECS RESTART UNTIL LAST LINE IS REACHED. Edited September 30, 2008 by kizman Link to comment Share on other sites More sharing options...
spudw2k Posted September 30, 2008 Share Posted September 30, 2008 Check out the following functions in the Help file for AutoIt. They can do what you need. FileReadLine() ;Read in a line of text from a text file. StringInStr() ;Checks if a string contains a given substring. StringReplace() ;Replaces substrings in a string. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 30, 2008 Share Posted September 30, 2008 Check out the following functions in the Help file for AutoIt. They can do what you need. FileReadLine() ;Read in a line of text from a text file. StringInStr() ;Checks if a string contains a given substring. StringReplace();Replaces substrings in a string. Also, the _IE* functions of the IE.au3 UDF for opening the page, entering values, and submitting the form. @kizman: There are many examples already posted for each of these steps, and the best are in the help file with the functions you need. "If you do it all for me, I might learn something from it" is NOT the model here... Start with some basic practice scripts that only perform one part, like the file reads or the _IE functions. If you get stuck, post what you've got and you'll get more help. >_< Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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