Discussion:
ALIAS @@ALTGR-. = *.*
(too old to reply)
Ralf Brinkmann
2010-11-15 18:31:03 UTC
Permalink
Hi everybody!

It's been a long time since I created some aliases...

I want an alias like AltGR (or Alt) plus "." to result in "*.*". How
must I write this in the ALIAS.TXT?

Gruß, Ralf
--
Windows XP Home SP3
Opera 11.00-1060
The Bat! Pro 4.2.36.4
E. S. Fabian
2010-11-15 19:22:38 UTC
Permalink
Ralf Brinkmann:
...
| I want an alias like AltGR (or Alt) plus "." to result in "*.*". How
| must I write this in the ALIAS.TXT?

I suspect you want to create an insert-only keystroke alias, i.e., one
that allows you anywhere in the command line to press the keystroke defined
to cause insertion of a string. I've never been successful loading keystroke
aliases from an alias definition file (i.e. one loaded with ALIAS /R), and
thus load mine specifically by a separate batch file. Below are two sample
lines from that file:

alias @alt-f4=`%@expand[`
alias @shift-f4=`bdebugger %@search[`

BTW, if you use SHRALIAS to share global aliases, when you log out,
SHARALIAS.EXE can save all global tables you enabled (directory history,
command history, aliases, functions). Look at HELP topic "shralias.htm" for
details.
--
HTH, Steve
Ralf Brinkmann
2010-11-15 20:32:33 UTC
Permalink
Hi Steve!
Post by E. S. Fabian
I suspect you want to create an insert-only keystroke alias, i.e., one
that allows you anywhere in the command line to press the keystroke
defined to cause insertion of a string.
Yes, you are absolutely right. And I was so stupid. I should not write
"@@ALT-. = *.*", but "@ALT-. = *.*", because the alias should not be
executed at once. As you wrote, it should be anywhere in the command
line and executed with a final RETURN.
Post by E. S. Fabian
I've never been successful loading keystroke aliases from an alias
definition file (i.e. one loaded with ALIAS /R), and thus load mine
specifically by a separate batch file.
There are several ways, but it's nearly the same. In a batch file you
would write "alias @alt-. = *.*". In an alias definition file you leave
the "alias" away.

Gruß, Ralf
--
Windows XP Home SP3
Opera 11.00-1060
The Bat! Pro 4.2.36.4
E. S. Fabian
2010-11-16 01:11:42 UTC
Permalink
Hello Ralf:

| *E. S. Fabian*:
|
|| I suspect you want to create an insert-only keystroke alias, i.e.,
|| one that allows you anywhere in the command line to press the
|| keystroke defined to cause insertion of a string.
|
| Yes, you are absolutely right. And I was so stupid. I should not
| write "@@ALT-. = *.*", but "@ALT-. = *.*", because the alias should
| not be executed at once. As you wrote, it should be anywhere in the
| command line and executed with a final RETURN.

Watch out for the space between the period and the equal sign! One of
the differences between loading aliases from a file and from the ALIAS
command is how you separate the name of the alias from its value. In the
alias file method any sequence of white space will do; a simple equal sign
"=" separating them is also OK. I never tried the whitespace - equal sign -
whitespace sequence. Of course in the ALIAS command any whitespace before
the equal sign becomes part of the alias name, and whitespace following the
equal sign becomes part of the alias value.
|
|| I've never been successful loading keystroke aliases from an alias
|| definition file (i.e. one loaded with ALIAS /R), and thus load mine
|| specifically by a separate batch file.
|
| There are several ways, but it's nearly the same. In a batch file you
| would write "alias @alt-. = *.*". In an alias definition file you
| leave the "alias" away.

Actually, I should have written that I never succeeded in saving
keystroke aliases into an ASCII alias definition file, and reloading that
file using ALIAS /R to restore the keystroke aliases. Ordinary aliases do
not represent any problem whatsoever.
--
Steve
Loading...