carlstarus 2 Posted October 1, 2013 Report Share Posted October 1, 2013 Hi guy's, I have kind of a weird question (possibly)... Does uBot write to html files? Application: I have 100 .html files with text and [keyword1] and [keyword2] and [lsi keyword] in some parts of the text. Can uBot find those variable and update the html files to reflect my list of keywords? If it can... does anyone now how ? Quote Link to post Share on other sites
Edward_2 85 Posted October 1, 2013 Report Share Posted October 1, 2013 Maybe load the html into a variable. Edit the var then save back to html file. Quote Link to post Share on other sites
Gogetta 263 Posted October 1, 2013 Report Share Posted October 1, 2013 You need to use the $get files function and load the file names into a list. Here is a quick example. ui text box("Path to Html Files:", #path) clear list(%get_files) add list to list(%get_files, $get files(#path, "Yes"), "Delete", "Global") loop($list total(%get_files)) { set(#current_filename, $next list item(%get_files), "Global") set(#current_file, $read file(#current_filename), "Global") comment("Start the replacing here and save the file back using the current_filename variable.") } Quote Link to post Share on other sites
carlstarus 2 Posted October 2, 2013 Author Report Share Posted October 2, 2013 Thank you guy's... That's a huge relief... I sometimes tend to put the cart in front of the horse with my uBot coding... (I'm still a tenderfoot when it comes to uBot... ) Thank you for your help Gogetta, that will save me a LOT of time figuring out what to do... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.