tontoconty Posted June 22, 2008 Share Posted June 22, 2008 I have looked through help files and example scripts but still stuck. Is a baby question I know . ; Script Start - This is a script to copy text from a web page into a spreadsheet in text format ;ClipPut(^c); This is to copy highlighted text from an HTML file and does not work WinActivate("Microsoft Excel - 0616timesheet"); this works when I key use control copy then activate the script WinWaitActive("Microsoft Excel - 0616timesheet") Send("!est{ENTER}") Send ("{TAB}") Send ("!{TAB}") Link to comment Share on other sites More sharing options...
martin Posted June 22, 2008 Share Posted June 22, 2008 (edited) I have looked through help files and example scripts but still stuck. Is a baby question I know .; Script Start - This is a script to copy text from a web page into a spreadsheet in text format;ClipPut(^c); This is to copy highlighted text from an HTML file and does not work WinActivate("Microsoft Excel - 0616timesheet"); this works when I key use control copy then activate the scriptWinWaitActive("Microsoft Excel - 0616timesheet")Send("!est{ENTER}")Send ("{TAB}")Send ("!{TAB}")ClipPut is used to write text to the clipboard and the parameter has to be text. See the help.I think you want to haveSend("^c");copy highlighted text to the clipboard. Or Send("^{INS}")Send("^v") ;paste the text somewhere else Or SEnd("+{INS}") Edited June 22, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 22, 2008 Moderators Share Posted June 22, 2008 If you are going to interact with web pages... look at the _IE* functions in the help file. If you want the text on the web page only, then you could look at _IEAttach or _IECreate to create an object to the page you're currently view, or create an object of the page you want to go to. Then use something like _IEBodyReadText or possibly _IEDocReadText. 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...
tontoconty Posted June 24, 2008 Author Share Posted June 24, 2008 ClipPut is used to write text to the clipboard and the parameter has to be text. See the help.I think you want to haveSend("^c");copy highlighted text to the clipboard. Or Send("^{INS}")Send("^v") ;paste the text somewhere else Or SEnd("+{INS}")Thanks for your help Send("^c"); works but only within the same fileWhen the Autoit application starts the highlight looses focus and it does not capture the text from the web page.I will try figure a way around that issue.TC Link to comment Share on other sites More sharing options...
tontoconty Posted June 24, 2008 Author Share Posted June 24, 2008 If you are going to interact with web pages... look at the _IE* functions in the help file. If you want the text on the web page only, then you could look at _IEAttach or _IECreate to create an object to the page you're currently view, or create an object of the page you want to go to. Then use something like _IEBodyReadText or possibly _IEDocReadText.Thanks for your help.Have read the help files but think I had better "step away from the computer" and continue mechanically copying the text to the clipboard. 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