 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
randallf
Joined: 06 Jul 2009 Posts: 678
|
Posted: Wed Feb 10, 2010 11:24 pm Post subject: Copy text from URL target |
|
|
Hello,
After much help and searching I managed to get the following together, I'd love to see if anyone has better methods. The main problem with this one is that it will fail if the page opens to a text-entry control.
This aims to load a webpage hidden, select all, copy and return.
You need AHK_L and COM_L.
| Code: |
WebCopyToClipboard(url)
{
pwb := COM_CreateObject("InternetExplorer.Application")
pwb.Visible := false ;hide this junk from the user
pwb.toolbar := false
pwb.statusbar := false
pwb.menubar := false
pwb.Navigate(url)
Loop
if (pwb.readyState = 4) ; wait for page to load
Break
ControlSend , Internet Explorer_Server1, ^a, ahk_class IEFrame
Sleep, 100
ControlSend , Internet Explorer_Server1, ^c, ahk_class IEFrame
pwb.Quit() ;exit internet explorer window
Return Clipboard
} |
Last edited by randallf on Thu Feb 11, 2010 8:14 pm; edited 1 time in total |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
Posted: Thu Feb 11, 2010 9:55 am Post subject: |
|
|
| You need autohotkey_L for this to do, dont you? |
|
| Back to top |
|
 |
randallf
Joined: 06 Jul 2009 Posts: 678
|
Posted: Thu Feb 11, 2010 2:25 pm Post subject: |
|
|
| aaffe wrote: | | You need autohotkey_L for this to do, dont you? |
Yes I'm sorry, I should have specified that. I only recently started using L, need to get in that habit.
This uses AHK_L and COM_L. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|