What is a Verb?

General discussion related to "Everything".
Post Reply
Stamimail
Posts: 692
Joined: Sat Aug 31, 2013 9:05 pm

What is a Verb?

Post by Stamimail » Sat Jul 14, 2018 9:29 pm

  • Go to Menu:Tools > Options > Keyboard
  • Select File | Custom Verb 1 (or 2 or ...)
and is there a list of Verbs?

NotNull
Posts: 1286
Joined: Wed May 24, 2017 9:22 pm

Re: What is a Verb?

Post by NotNull » Sat Jul 14, 2018 10:05 pm

Explorer uses verbs to define different types of action you can execute on a filetype (or folder).
Windows default verbs are Open, Edit, Print, RunAs, RunAsUser but applications can define any number of own verbs , like Play or queue for mp3 files.
If there is no default verb defined, the default is always 'Open' That (the default verb) is the action that will be executede when you double-click a file in Explorer. The other actions that are defined through verbs are shown in the context-menu (right-click) or the extended context menu (SHIFT-rightclick).
(BTW: Shift-F10 shows both context-menu an extended context-menu).

The verb is just a name; you could define a verb yourself for - for example - .txt files and call it Cookiemonster. What is important is, which program you connect to it, like notepad.exe %1. That is what will get executed when you select "Cookiemonster"

This is all configured in the registry.

Stamimail
Posts: 692
Joined: Sat Aug 31, 2013 9:05 pm

Re: What is a Verb?

Post by Stamimail » Sun Jul 15, 2018 7:03 pm

I know these things:

HKEY_CLASSES_ROOT in Registry has a list of extensions for configure.
I encountered it a long time ago when I wanted to add Copy Path to my Context Menu (inspired by Everything):
https://www.askvg.com/how-to-get-window ... text-menu/
https://www.askvg.com/registry-tweak-to ... n-windows/

Also, Everything has this in Options:
Image

1. I couldn't find the term "Verb" in the above. So I understand that a "Verb" is actually refer to a Context Menu Item (and not its command)?
2. What language/s are those commands written in?

NotNull
Posts: 1286
Joined: Wed May 24, 2017 9:22 pm

Re: What is a Verb?

Post by NotNull » Sun Jul 15, 2018 8:17 pm

Even the $exec("%1") makes (implicit) use of the verb-mechanism.

Here's what happens if you double-click the Myfile.txt file in Everything:
(simplified; there are exceptions and there is a lot more to it; but to get the idea..)
  • Everything asks Explorer (the shell) to execute C:\path\myfile.txt
  • Explorer looks in the registry to find out what to do with .txt files (HKCR\.txt)
  • and finds it can find details about that under the (default) key txtfile
  • Looking under HKCR\txtfile\Shell it looks if there is a verb defind under (default).
  • If so (let's say it found the verb "dummy"), execute what is under HKCR\txtfile\shell\dummy\command
    But there is no "dummy" defined, so time for the next step:
  • If there is an "Open" verb under HKCR\txtfile\shell\, find out what program to run under HKCR\txtfile\shell\Open\command.
  • On my system it says: %SystemRoot%\system32\NOTEPAD.EXE %1 (whre c":\path\mufile,txt will be substituted for %1)
  • Explorer (shell) will execute c:\windows\system32\NOTEPAD.EXE "c:\path\myfile,txt"
  • If there is no Open verb defined, it will execute the command that is configured for the alphabetically first verb (see .ttf for an example)
    (BTW: the entries in the context menu are alphabetically sorted by verb)


See viewtopic.php?f=4&t=6747#p21304 for an example reg-file where you can find verb-related / contextmenu settings

Stamimail
Posts: 692
Joined: Sat Aug 31, 2013 9:05 pm

Re: What is a Verb?

Post by Stamimail » Mon Jul 16, 2018 6:46 am

Custom Verbs
void wrote:What are custom verbs?
Verbs allow you to perform different actions on files, such as open, print, preview and edit.
You can define your own verbs with the Windows Registry Editor (Regedit).

You can define up to 12 custom verbs with Everything and assign a key binding to each one.
Should the wording be improved?
It sounds like Everything lets you to add items(=verbs) to Context Menu.

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: What is a Verb?

Post by void » Tue Jul 17, 2018 9:13 am

A verb is an action to perform on a file or folder.

Verbs and context menu items are different things.
Most context menu items will have an associated verb.
Some context menu items implement a IContextMenu handler and don't have a verb.

The Custom Verbs help does not go into any detail about adding verbs.
Custom Verbs assumes the verb is already defined.

To define your own verbs, please see:
https://docs.microsoft.com/en-us/window ... u-handlers

These custom verbs will show up in the Everything context menu.

Post Reply