English 中文(简体)
是否有办法直接在右 mo点击AutoHotkey v2之后指明过去吗?
原标题:Is there a way to specify paste directly after right mouse click in AutoHotkey v2?

是否有办法直接在右 mo点击AutoHotkey v2之后指明过去吗?

现行法典

<^z::Send, {RButton}{p}

Problem / There are multiple shortcuts (p) in the right-clicked menu

Other / The reason why Ctrl+V is not used is because I want the paste destination to be the selected folder. Ctrl+V can only paste to the current folder.


Added on December 18, 2023.

http://www.ohchr.org。

/img/result/2023/

/img/result/2024/

<>作业程序>

  1. Cut out hoge. jpg

  2. 在参考/结果/文件夹中,选择2023/倍的斜体,并将其带入2023/倍的圆。

<>光线>

如果我右翼和过去,我会收到/img/result/2023/hoge.jpg,

www.un.org/Depts/DGACM/index_spanish.htm 我不想做什么?

但是,如果我把Ctrl+V压倒过去,它就变成了/img/result/hoge.jpg。

When right-clicking in the folder with jpg, "Play with Windows Media Player (P)" is displayed, and "Paste (P)" conflicts with (P).

问题回答

也许,你不使用现成的牧师行为,更不用最充分地使用自动骑师,以完成整个行动,而不用介绍主要的新闻。

I can t be sure what your entire operation will entail based on the details given. For example, you did not indicate where hoge.jpg exists currently. Also, how should it determine whether it ends up in the 2023 or 2024? These things could be further automated instead of relying on the current state of Windows Explorer.

无论如何,例如,我举一个例子,表明我能做我认为你再次要求的事情,但根据你的情况,可能还有更好的办法。 只有提供充分的信息,才能适当解决这一问题。

<^z::
{
    ; get the HWND of the current active Windows Explorer window
    If (!(WinHWND := WinActive("ahk_class CabinetWClass")) &&
            !(WinHWND := WinActive("ahk_class ExploreWClass"))) {
        ; if no Explorer window is active, cancel and do nothing
        return
    }
    ; get the Window title to ensure proper tab
    ; (this logic can be skipped if not using tabbed Explorer)
    winTitle := WinGetTitle("ahk_id " WinHWND)
    for window in ComObject("Shell.Application").Windows {
        ; The following works for getting the active window (and tab) for
        ; Explorer in Windows 10/11, but it can mess up if two tabs in the same
        ; Explorer window have the same window title in Windows 11
        if (window.hwnd == WinHWND && window.LocationName == winTitle) {
            ; get the COM Object of the FIRST selected item in Explorer
            selectedFolder := window.Document.SelectedItems().Item(0)
            ; get the full path of the item above
            selectedFolderPath := selectedFolder.Path

            ; Some other useful variables, albeit unnecessary in this example:
            currentDirectory := window.Document.Folder.Self.Path
            selectedFolderName := selectedFolder.Name ; just the folder name itself

            ; The active window was found, so stop looping the Explorer windows
            break
        }
    }
    ; A_Clipboard contains the full path of the file in the clipboard (cut/copy)
    ; Move the file in the clipboard to the first folder selected in Explorer
    FileMove A_Clipboard, selectedFolderPath
}




相关问题
How do you control a .NET checkbox from AutoHotKey?

I have a .NET application that contains a checkbox (System.Windows.Forms.Checkbox). This component (WindowsForms10.BUTTON.app.0.378734a1) is not directly controllable in AutoHotKEy using "Control,...

How can I rename my visual studio taskbar button?

I often work with multiple checkouts of the same solution, but as they all have the same name, all the taskbar buttons appear the same. I would like to rename the taskbar buttons so I can identify ...

Run AutoHotkey script when screen locked?

I ve written a couple of scripts with AutoHotkey, but I notice they only work when a user is logged in and the screen isn t locked. I d like to schedule the script to run. Does anyone know if that ...

AutoHotKey key SEQUENCE, not just single-key hotkey

I m not stupid... really. How do you map a key SEQUENCE (ie: Ctrl + Q , F) in AutoHotKey. I ve got Ctrl + Q down: ^q:: I ve even got F: f:: The examples in the help files even show how to do two ...

Where is the source code for AutoScriptWriter

I am using autohotkey for test now but tired with modifying the "Sleep, 100" generated by autoscriptwriter. So I decided to get the source code and see if I can modify it a little bit to fit my needs ...

Holding down the left mouse button in AutoHotkey

I want a script where pressing F1 makes AutoHotkey hold down the left mouse button. I then want the script to release the mouse once I press the key again. How can I do that?

热门标签