AutoHotkey Community

It is currently May 27th, 2012, 8:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: February 7th, 2012, 7:14 am 
Offline

Joined: August 30th, 2007, 9:36 pm
Posts: 90
Hi,

I've been trying different things but cannot seem to accomplish this. I would like to go to a webpage embeded IE and be able to use the keywboard commands Ctrl+C to copy the highlighted text on the page, and Ctrl+V to paste, but can't seem to get it working.

Code:
Gui, Add, ActiveX, w555 h750  0x200000 0x100000 0x800000 x0 y0 vWB,,Shell.Explorer
Gui,Show,x353 y146 h600 w555 xCenter yCenter ,

url = http://www.autohotkey.com
WB.Navigate(url)
Return

GuiClose:
ExitApp


Any help would be greatly appreciated.

Thanks,
Chip


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2012, 7:36 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Related: Need help with embed IE in GUi and keyboard commands

Code:
Gui, Add, ActiveX, w555 h750  0x200000 0x100000 0x800000 x0 y0 vWB, Shell.Explorer
Gui,Show,x353 y146 h600 w555 xCenter yCenter ,
ComObjConnect(WB, new Event)
url = http://www.autohotkey.com
WB.Navigate(url)
Return

GuiClose:
ExitApp


class Event {
   DocumentComplete(wb) {
      static doc
      ComObjConnect(doc:=wb.document, new Event)
   }
   OnKeyPress(doc) {
      static keys := {1:"selectall", 3:"copy", 22:"paste", 24:"cut"}
      keyCode := doc.parentWindow.event.keyCode
      if keys.HasKey(keyCode)
         Doc.ExecCommand(keys[keyCode])
   }
}

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2012, 3:50 pm 
Offline

Joined: July 10th, 2008, 8:49 am
Posts: 1865
Location: Brussels, Belgium
I tried your example for curiosity but CTRL+C/V doesn't work...


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: BrandonHotkey, Google Feedfetcher, hyper_, immunity, sjc1000 and 81 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