Copy Specific Text From Internet Explorer Window with VBScript
Hello! I am trying to automate a process in which I need to copy and paste specific information from a website. I developed a VB Script that opens up the site (using IE), navigates to the record I need, selects all (using sendkeys), copies the info, then pastes it into a MS Notepad document. However, I only need to grab a few lines from the site. How can I do this? Is it possible to set the range for exactly what I need? For the record, the information will always be in the same location. Is it possible to have the script only select and copy specific characters (line 23, 12 characters in, copy twenty characters)? I should add that I am very new to scripting, so any answers will have to be very explicit. Thanks for the help!
Here is the relevant portion:objShell.SendKeys "^a"WScript.sleep 1000objShell.SendKeys "^c"WScript.sleep 1000objShell.Run "notepad"WScript.sleep 1000objShell.SendKeys "^v"
Another problem I have is that I need to loop through several records. Basically, I have a page with hundreds of records. I need the script to select one record, then pull three fields from that record (on the next page), then go back, go to the next record and do the same...loop for all the records. Ideally, I need to have each set of fields on one line of the .txt file, as opposed to overwriting the file each time. I imagine I would have to save the fields to some sort of buffer or virtual file, then download the info to the .txt file once it looped through all records.
Thanks again for the quick response. I really appreciate it.