AutoHotkey Community

It is currently May 27th, 2012, 2:30 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: February 11th, 2010, 12:24 am 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
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 February 11th, 2010, 9:14 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2010, 10:55 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
You need autohotkey_L for this to do, dont you?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2010, 3:25 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group