I receive some mails asking me
"Emmanuel! What is the point of using snippets?"
to implement a
Pick Loop.
I can do the same, without
snippets,
and with just 2 entries!!!
Step 1: Create an expansion glossary entry to produce the action repeatedly
Create the
expansion glossary entry
with the dedicated short form of our choice:

I have highlighted the "expansion snippet" :-) that does the scroll down action with a red box.
The
Pick command
that follows proposes to perform the scroll down action again.
Step 2: Create the pick list that proposes the action again
Now we create the
pick list
that proposes the action again.

It has only one choice,
and not so surprisingly (after all we are implementing a loop),
the expansion is completely the same as in step 1.
Fair enough! I understand that it may well appear simpler to do it like that.
What I find elegant in the method using
snippets
is that the action to repeat is isolated in a single
snippet.
You may ask "What's the point?"
Imagine you think that
{Down 5}{Up 5}{NoSpacing}
does a better job scrolling down than
{SrollWheel}-1{/ScrollWheel}{NoSpacing}
and therefore decide to change the way you implement scroll down.
Using the
Pick Loop Method with Snippets
you will need to change only one
snippet
whereas using the
Pick Loop Method without Snippets
you will need to change the 2 entries created in the steps 1 and 2 above.
I happen to do a job where I love to have things centralized so that a change impacts only a central place. :-)
That is basically the power of snippets.
A snippet
centralizes a know-how
that can be referenced all over the place using the
snippet command
instead of
hard-copying
it all over the place.
In the 2 entries of this post you can see that the scroll down know-how is hard-copied twice (see the red boxes).
Followups