activation cut, copy,paste shurtcut keys in shell.explorer activex

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
GS SAHU
Posts: 37
Joined: 29 Sep 2014, 12:18

activation cut, copy,paste shurtcut keys in shell.explorer activex

02 Jan 2019, 04:13

i want to make a file explorer(two penal) with working in two folder
in shell.explorer context menu is working but shurtcut key are not working as ctrl+c,ctrl+a,ctrl+x,ctrl+v
pls. help for shurtcut key activation and connect event with return full path.


#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

Gui, +Resize
DriveGet, GetDrives, List
loop, % Strlen(GetDrives)
{
dname .= substr(GetDrives,A_index,1) ":\|"

}
dname .= "|More.."
Gui, Add,Combobox, x10 w400 vPath gChange, %dname%
Gui, Add,Combobox, x+10 w400 vPath1 gChange1, %dname%
Gui Add, ActiveX, x10 w400 h400 vEX1, Shell.Explorer
Gui Add, ActiveX, x+10 w400 h400 vEX2, Shell.Explorer
EX1.Navigate("c:\")
EX2.Navigate("d:\")
GuiControl, chooseString, Path, c:\
GuiControl, chooseString, Path1, d:\
Gui Show
return

GuiSize:

GuiControl, move, Path, % "W" . (A_GuiWidth/2-20)
GuiControl, move, Path1,% "x" . (A_GuiWidth/2) " W" . (A_GuiWidth/2-20)
GuiControl, move, EX1,% "W" . (A_GuiWidth/2-20) . " H" . (A_GuiHeight -50)
GuiControl, move, EX2,% "x" . (A_GuiWidth/2) " W" . (A_GuiWidth/2-20) . " H" . (A_GuiHeight -50)
Gui, submit, nohide
return

Change:
gui,submit,nohide
IF PATH = More..
{
FileSelectFolder, PT
IF PT =
EX1.Navigate("C:\")
else
EX1.Navigate(PT)
dname .= "|"PT

GuiControl, , Combobox1, |%dname%
GuiControl, ChooseString, PATH, %PT%
}
else
{
EX1.Navigate(Path)
}
return

Change1:
gui,submit,nohide
IF PATH1 = More..
{
FileSelectFolder, PT
IF PT =
EX2.Navigate("D:\")
else
EX2.Navigate(PT)
dname .= "|"PT

GuiControl, , Combobox2, |%dname%
GuiControl, ChooseString, PATH1, %PT%
}
else
{
EX2.Navigate(Path1)
}
return

esc::
GuiClose:
ExitApp

aifritz
Posts: 301
Joined: 29 Jul 2018, 11:30
Location: Germany

Re: activation cut, copy,paste shurtcut keys in shell.explorer activex

03 Jan 2019, 05:54

That's a good question that would interest me too. :)

The following method described from jethrow seems to work only for real HTML-documents,
found here: https://autohotkey.com/board/topic/7420 ... ivex-copy/

Code: Select all

html = 
(
<html>
<body>Why I can not copy this text when I press <i>Control+C</i>?</body>
</html>
)
Gui, Add, ActiveX, vDoc w400 h100, HtmlFile
ComObjConnect(Doc,"Doc_")
Doc.write(html)
Gui, Show
Return

GuiClose:
ExitApp

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])
}
GS SAHU
Posts: 37
Joined: 29 Sep 2014, 12:18

Re: activation cut, copy,paste shurtcut keys in shell.explorer activex

04 Jan 2019, 02:10

i try it but it is not working in syslistview322 control.
aifritz wrote:
03 Jan 2019, 05:54
That's a good question that would interest me too. :)

The following method described from jethrow seems to work only for real HTML-documents,
found here: https://autohotkey.com/board/topic/7420 ... ivex-copy/

Code: Select all

html = 
(
<html>
<body>Why I can not copy this text when I press <i>Control+C</i>?</body>
</html>
)
Gui, Add, ActiveX, vDoc w400 h100, HtmlFile
ComObjConnect(Doc,"Doc_")
Doc.write(html)
Gui, Show
Return

GuiClose:
ExitApp

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])
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Exies, JoeWinograd, scriptor2016 and 102 guests