What's the easiest way to make a hotkey for windows?

后端 未结 7 962
无人共我
无人共我 2021-02-07 22:57

For example , you push Ctrl+V and insert the buffer content into the window. How can I create my own hotkeys like that? Sorry for noobish question.

7条回答
  •  自闭症患者
    2021-02-07 23:57

    Simple script with windows with no third party software required.Just save as .vbs file and double click

    currentDirectory = left(WScript.ScriptFullName,(Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))
    
    Set objShell = WScript.CreateObject("WScript.Shell")
    Set lnk = objShell.CreateShortcut(currentDirectory  & "search.LNK") 
    lnk.TargetPath = currentDirectory  & "search.bat"
    lnk.Arguments = ""
    lnk.Description = "Abiram's search"
    lnk.HotKey = "SHIFT+CTRL+C"
    lnk.WindowStyle = "7"
    lnk.WorkingDirectory = currentDirectory
    lnk.Save
    'Clean up 
    Set lnk = Nothing
    

    Change the lnk.TargetPath to include your exe file or batch file to be called.

提交回复
热议问题