Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

v1.1.17.00 - keyboard shortcuts in an IE ActiveX control


  • Please log in to reply
1 reply to this topic
rousni
  • Members
  • 133 posts
  • Last active: Jan 11 2015 12:45 AM
  • Joined: 23 Mar 2006

Until the last version (v1.1.17.00 - December 27, 2014) it was possible to copy text from an IE ActiveX control using the Ctrl+C shortcut - the script below -, but not now.

;-----------------------------------------------------------------------------

Gui, Add, ActiveX, x0 y0 w500 h300 vDoc, HtmlFile
 
ComObjConnect(Doc, "Doc_")
Doc.write("1234567890")
 
Gui, Show, x500 y300 w500 h300, Try To Copy Using Ctrl+C
 
Doc_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])
}
;-----------------------------------------------------------------------------


Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012
Use http://ahkscript.org to report any issues as that's the officelle domain of ahk 1.1+

And where the active devs are
Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About