Переключение в диалог File-In-Use с клавиатуры?

268
Synetech

В Windows Vista и более поздних версиях, когда вы пытаетесь переместить, удалить или переименовать заблокированный файл, в проводнике отобразится диалоговое окно « Используемый файл », в котором можно повторить попытку или отменить.

Проблема в том, что это диалоговое окно отсутствует в списке Alt-Tab, поэтому вы не можете легко переключиться на него. Если вы вызвали его из окна Проводника, то вы не только не сможете переключиться в диалоговое окно, но даже окно Проводника будет удалено из списка Alt-Tab, чтобы вы больше не могли переключаться на него.

Это очень расстраивает, потому что если вы переключились на другое окно, то кажется, что единственный способ получить доступ к диалоговому окну « Используемый файл » - это использовать мышь, чтобы минимизировать перекрывающиеся окна, чтобы увидеть его. Это может быть сложно / раздражающе / невозможно при использовании только клавиатуры по любой причине.

Кто-нибудь знает простой способ получить доступ к диалоговому окну « Используемый файл » с помощью клавиатуры?

1
Похоже, что у Office может быть [похожая проблема] (http://social.msdn.microsoft.com/Forums/office/en-US/914c3e44-12dc-4811-a056-cb0267763b2e/file-is-locked-dialog- не-бытие сфокусированного когда-использования-на-documentsopen-функции? Форум = worddev). Synetech 10 лет назад 0

2 ответа на вопрос

2
Synetech

The File In Use dialog is modal to the originating window/folder, so one option that is not ideal, but better than grabbing for the mouse is to switch to the originating window using an alternate means. Since the folder is (inexplicably) removed from the Alt-Tab list, you can switch to it from the taskbar. For example, if the folder is the second taskbar button from the left, then you can try pressing ⊞ Win+2 to activate it and it should focus the File In Use dialog. If the originating folder is the desktop, then pressing ⊞ Win+D should activate the desktop and focus the offending dialog.

Unfortunately this is not a foolproof method and it has some limitations and problems.

  1. It requires accessing the taskbar button of the originating folder which means using the ⊞ Win combos (assuming they have not been disabled or overridden). Further, it becomes cumbersome and unwieldy if there are numerous taskbar buttons, especially if there is any taskbar scrolling required.

  2. If you re-open the originating folder, then the folder itself will retake focus from the File In Use dialog and any keyboard activity to it will go to the folder instead of the dialog (even though the dialog remains on top of the folder). In addition, the folder itself will reappear in the Alt-Tab list, but the File In Use dialog will not be focused anymore, so switching to the folder won’t help now and you now must find a way to switch directly to the dialog itself.

One way to refocus the dialog is to then try to rename/delete/move the locked file again, but that creates a new File In Use dialog instead of focusing the existing one ◔_◔. However, the new dialog is now focused, and if you dismiss it, then the old dialog takes focus instead of the folder. It’s a ridiculous amount of work and absurd interface design, but at least it works and you don’t have to resort to the mouse.

Sadly, Microsoft really dropped the ball and their poor design choices and worse testing are shining through here.

0
Synetech

I thought of another (not ideal, but certainly good enough) solution. If you have/use AutoHotkey or similar utility, you can use a script to simplify the task of switching to the File In Use dialogs.

The script below is an AutoHotkey script which binds a simple function to Ctrl+Alt+Tab which when pressed, finds all File In Use dialog boxes and activates them so that they can have keyboard focus.

Aside from the different hotkey that needs a little getting used to, it has one limitation: even though it activates all File In Use dialogs in turn, if you dismiss the last one to get activated, the next one down does not automatically get keyboard focus as you might expect. Unfortunately this is just another symptom of the defective way in which the dialog was implemented and you simply have to press the hotkey again to get to the next one.

; AutoHotkey script that binds Ctrl+Alt+Tab to a function to ; activate/focus Windows Explorer’s File-In-Use dialogs ; Ctrl+Alt+Tab ^!Tab:: ; Get a list of all dialog boxes with the title “File In Use” WinGet, list, List, File In Use ahk_class #32770 ; For each such dialog box… Loop, %list% { this_id := list%A_Index% ;Get its HWND WinActivate, ahk_id %this_id% ;Activate it } return 
(Что касается реализации диалога, если вы программист, обратите внимание, что диалог является модальным и самым верхним по отношению к исходному окну, но не * другим * окнам. Это из-за пересмотренного способа, использования новых, нестандартных и даже проприетарных элементы управления, в которых проводник был реализован с Vista.) Synetech 10 лет назад 0