falslev Posted May 9, 2004 Posted May 9, 2004 I need an example ther can find some text on a website, highlite it an copy.The text is allways at the same position.Ex.On http://www.autoitscript.com/autoit3/ i want the code to copy this text:AutoIt v3 is an opensource BASIC-like scripting language designed for automating the Windows GUI. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys).
scriptkitty Posted May 9, 2004 Posted May 9, 2004 (edited) if it is always in the same position, you can use mouseclickdrag() from one set of coords to the next, and then send control+C to copy it into the clipboard, and clipget() to retrive it. Since I don't know the browser version, what add ons you might have(google toolbar), and if you use text or picture icons, I can't give the exact coords. One other way is to use URLDownloadToFile() and then read the while file and grab the text that way. Just make sure the page is loaded before you use the mouse version. Help file really helps a lot, and use AutoIt spy to find the mouse coordinates. AutoItSetOption("MouseCoordMode", 0);1 = absolute screen coordinates (default) winactivate("HiddenSoft") winwaitactive("HiddenSoft") send("{pgup 2}") MouseClickDrag ( "left", 200,455,793,617,0 ) send("^c") msgbox(1,"",clipget()) Edited May 9, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers.
falslev Posted May 10, 2004 Author Posted May 10, 2004 Thank you scriptkitty. That was just the part i needed.
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