Reassign a key combination : Win+Y

Yes , It is.
But don't happen with Windows explorer.

What's next ?

What doesn't happen with Explorer?

John , my script is about to open a menú and select a name for create an empty txt file in the opened folder.
I use the hotkey win+y for this purpose.
I don't expect nothing to happen when the cursor is in notepad. But I hope DO can emulate better than explorer.

Explorer doesn't let you assign hotkeys at all.

Jon I am not telling you that.
The combination win+y Works under Windows explorer and not in DO.

under Windows 8.1
I need to show the full path in the window title to work correctly.
I do the same in DO, but don't Work.

Best Regards

p.D. I will try to assign other hotkeys meanwhile.

In what way does Win+Y work under Windows Explorer? What does it do?

Well that is a good question.
So I will put the ahk script here to analyze if you want.
The script is for creating empty txt files in a folder selecting from a menú. When the win+y combination is pressed a window is open showing a list of txt file names to be selected. you can select one or several and intro creating all the txt files in the open folder.
At the present momento Works with Windows explorer, but don't do under DO.

Best Regards

#SingleInstance Force
 
    #ifWinActive ahk_class CabinetWClass
    {
      #y::
      Gui, Destroy
      WinGet, WinID, ID, A
      Gui, +LastFound
      HWND := WinExist()
      ControlGetText, DesPath, ToolbarWindow323, ahk_id %WinID%
      StringMid,DesPath,DesPath,Instr(DesPath,": ") + 2
      Gui, Add, ListView, r10 NoSort vChosenName h300 w400, File Name (Path: %DesPath%)
         For A,B in {1:"Instrucciones.txt",2:"Instalar en mv.txt", 3:"Es mal portable. Instalar como no portable.txt", 4:"Instalado como portable.txt", 5:"Instalar cuando se pueda.txt", 6:"ReciboLLamadaAlas.proponer fecha hora.txt", 7:"Ver pantallazos.proponer fecha hora.txt", 8:"Ver grabaciones de la fecha.proponer fecha sistema.txt", 9:"password   pegado del portapapeles.txt", 10:"Avira detecta virus. en parte a especificar.txt", 11:"File11.txt", 12:"Es un juego.txt", 13:"Es para entorno MAC Apple.txt", 14:"Tambien tienen versiones de pago.txt", 15:"No es buen portable.Instalado como portable.txt",16:"No funcione en xp. es para w7 o sup.txt", 17:"Nuevo Notepad++ Document.txt",18:"Script AutoIt.au3",19:"Script Autohotkey.ahk", 20:"es un trial de prueba.txt", 21:"ae.fecha.txt",22:"File22.txt", 23:"File23.txt", 24:"File24.txt",25:"File25.txt",26:"File26.txt"}
        LV_Add("",B)
        Gui, Add, Button, gChoose, Submit
      Gui, Show, h340 w420, Choose File Name
      Return
    }
 
    Choose:
    ControlGet, List, List, Selected, SysListView321, ahk_id %HWND%
    Gui, Destroy
    Loop, Parse, List, `n
    {
       If !FileExist(DesPath "\" A_LoopField)
          FileAppend,, %DesPath%\%A_LoopField%
    }
    Return

Sorry. I don't need to show the full path in the title bar for this script.
That happens with other script unde Windows explorer. At the present moment I am using in both environments (DO and WE) . Sometimes fails in DO. I am debugging.

So you're saying you've actually assigned the Win+Y key through AHK?

You are a clever man.
I did.

Then that's something you'd have to ask the makers of AutoHotkey about.

balls outside magistral game.

Make sure you aren't running the whole dopus.exe process UAC-elevated as Administrator, as that could block hotkeys installed by other processes, and would be a difference between the Opus and Explorer processes.

Thanks Leo.
I am the administrador and I have totally disabled the UAC service. I don't use because interfere with some features of my CRM.
Best Regards

That should be OK then. If UAC is completely disabled then it won't be a factor.

I will try with another key combination and comment.
Best Regards

I have try control+shift+y
Didn't work under DO.
Goes well under explorer.
What's next ?

Can I créate a script with DO for doing this ?
How ?

Your AHK script probably doesn't work in Opus -- in fact, literally only works in Explorer, I would bet -- because of this line at the top of it:

#ifWinActive ahk_class CabinetWClass

CabinetWClass is the window class Explorer uses. The first line of your script is saying it should not do anything unless Explorer is the active window. The rest of the script also does things that will only work with Explorer, since it's assuming certain controls exist in the window and reading things directly out of them. (That might not even work with future versions of Explorer, let alone Opus.)

We aren't very familiar with AHK, and focused on the claim that hotkeys weren't working in Opus, so this isn't something we noticed at first. Also why, if you're having trouble with an AHK script, it's better to ask on the AHK forums than on here.


If you want to set something similar up using Opus, there are a bunch of ways you can do it, including scripts that generate custom dialogs or pop-up menus and are triggered by hotkeys...

But the easiest is probably to just have a simple menu on your normal toolbars, with each of the filenames you might want to create.

How to Create New/Empty Files gives the commands to create new, empty files with the names you want.

Editing the toolbar should get you up to speed on creating menus and buttons, if you aren't already familiar with that part of Opus.

When making menus and buttons, you can make them keyboard controllable by placing a & character before another character in their labels.

For example, if you name your menu Cre&ate Empty Files then you can open the menu from the keyboard by pushing Alt+A. If you name one of the items within it that creates a file &Create file 1, you could push C after opening the menu to quickly access it. (Or just use the cursor keys after opening the menu.) Of course, it can be driven via the mouse as well.

You can also give hotkeys to individual menu items, so you could for example push a hotkey to instantly create a certain file in the current folder without anything popping up.

1 Like