Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Does variable expansion (ctrl-x) actually work?

May
572
4
I tried using Ctrl-X to expand variables on a line I was typing at the command prompt. It does nothing.

There is no reference to Ctrl-X in my ini-file, nor is there any reference to "variableexpand".

What could possibly be interfering with Ctrl-X working?

TCC 10.00.76 Windows XP [Version 5.1.2600]
TCC Build 76 Windows XP Build 2600 Service Pack 3
 
dcantor wrote:

> I tried using Ctrl-X to expand variables on a line I was typing at the command prompt. It does nothing.
>
> There is no reference to Ctrl-X in my ini-file, nor is there any reference to "variableexpand".
>
> What could possibly be interfering with Ctrl-X working?

Ctrl-X will only expand the variable at the cursor, not all of the
variables on the line.

Assuming you're putting the % at the beginning of the variable name, and
the cursor is somewhere on the word (or immediately to the right), then
it should work -- barring a plugin grabbing the key instead, a key alias
using that key sequence, or a NormalKey / NormalEditKey directive
overriding it.

Rex Conn
JP Software
 
dcantor wrote:



Ctrl-X will only expand the variable at the cursor, not all of the
variables on the line.

Assuming you're putting the % at the beginning of the variable name, and
the cursor is somewhere on the word (or immediately to the right), then
it should work -- barring a plugin grabbing the key instead, a key alias
using that key sequence, or a NormalKey / NormalEditKey directive
overriding it.

(Second attempt at answering this -- the first attempt seems to have disappeared.)

I found that when the TCC window is detached from Take Command, Ctrl-X works as described, but when it's attached as a tab, Ctrl-X does not work.
Is there a way to make Ctrl-X work within a Take Command tab?

In researching the help file, I found the following error and omissions:

1. There is an index entry for "Ctrll-C" which should be included with "Ctrl-C".

2. The index entry for Ctrl-X does not have an entry for the Variable Expand page nor for the Command Line Editing Page.
 
I found that when the TCC window is detached from Take Command, Ctrl-X works as described, but when it's attached as a tab, Ctrl-X does not work.
Is there a way to make Ctrl-X work within a Take Command tab?

Here's something you might try. Close Take Command and run RegEdit. Navigate to HKCU\Software\JP Software\Take Command 10\Settings\NormalLayout. Find the "Shortcuts" key within NormalLayout and rename it to something different, say "Shortcuts.BAK". Exit RegEdit and restart Take Command. Has the problem gone away?
 
dcantor wrote:

> (Second attempt at answering this -- the first attempt seems to have disappeared.)
>
> I found that when the TCC window is detached from Take Command, Ctrl-X works as described, but when it's attached as a tab, Ctrl-X does not work.
> Is there a way to make Ctrl-X work within a Take Command tab?

You've either not enabled the Ctrl key for the TCC window (Options /
Configure Take Command / Tabs), or you have an existing Ctrl-X menu
shortcut defined in Take Command. (Right click on the menu and select
"Customize".)

Rex Conn
JP Software
 
rconn wrote:
| Ctrl-X will only expand the variable at the cursor, not all of the
| variables on the line.

That's not my observation. Given the command line

for %x in (%_hdrives) echo %z

the cursor in the middle of "echo" %x, %z and %_hdrives were all expanded by
the "VariableExpand" keystroke (ctrl-y here, ctrl-x is disabled using
NormalKey directive). The values for %x and %z were the same as "set x" and
"set z" showed (i.e., as they were before FOR was executed). _hdrives
correctly listed the hard drives, but it also incorrectly listed my virtual
disk. Identical operation in several TCC versions.
--
Steve
 
Here's something you might try. Close Take Command and run RegEdit. Navigate to HKCU\Software\JP Software\Take Command 10\Settings\NormalLayout. Find the "Shortcuts" key within NormalLayout and rename it to something different, say "Shortcuts.BAK". Exit RegEdit and restart Take Command. Has the problem gone away?

Thanks, Charles. I tried that -- it made no difference.
 
dcantor wrote:



You've either not enabled the Ctrl key for the TCC window (Options /
Configure Take Command / Tabs), or you have an existing Ctrl-X menu
shortcut defined in Take Command. (Right click on the menu and select
"Customize".)

Rex Conn
JP Software

I do have left-ctrl enabled for Take Command, and there is nothing that I can find in keyboard customization menus that has Ctrl-X assigned.

This is really mystifying. Meanwhile, I've assigned F11 for this function (and that works), but I'd prefer a control character.
 
Steve Fábián wrote:

> rconn wrote:
> | Ctrl-X will only expand the variable at the cursor, not all of the
> | variables on the line.
>
> That's not my observation. Given the command line
>
> for %x in (%_hdrives) echo %z
>
> the cursor in the middle of "echo" %x, %z and %_hdrives were all expanded by
> the "VariableExpand" keystroke (ctrl-y here, ctrl-x is disabled using
> NormalKey directive). The values for %x and %z were the same as "set x" and
> "set z" showed (i.e., as they were before FOR was executed). _hdrives
> correctly listed the hard drives, but it also incorrectly listed my virtual
> disk. Identical operation in several TCC versions.

Your virtual disk is incorrectly identifying itself as a hard drive.

Rex Conn
JP Software
 
dcantor wrote:

> ---Quote (Originally by rconn)---
> dcantor wrote:
>
>
>
> You've either not enabled the Ctrl key for the TCC window (Options /
> Configure Take Command / Tabs), or you have an existing Ctrl-X menu
> shortcut defined in Take Command. (Right click on the menu and select
> "Customize".)
>
> ---End Quote---
> I do have left-ctrl enabled for Take Command, and there is nothing that I can find in keyboard customization menus that has Ctrl-X assigned.

If you have left-ctrl enabled for Take Command, then you can only use
right-ctrl-X for the TCC variable expansion.

Rex Conn
JP Software
 
On Wed, 09 Sep 2009 23:01:49 -0500, rconn <> wrote:

|If you have left-ctrl enabled for Take Command, then you can only use
|right-ctrl-X for the TCC variable expansion.

I have left-ctrl checked in the options dialog but Ctrl-X with *either* ctrl key
will do variable expansion. And as another pointed out, I get variable
expansion regardless of where the cursor is (for example, in the middle of
"echo" after typing "echo %_pid").
--
- Vince
 
dcantor wrote:



If you have left-ctrl enabled for Take Command, then you can only use
right-ctrl-X for the TCC variable expansion.

Rex Conn
JP Software

Yes, I understood that. NEITHER ctrl key with X works.
 
Re: Does variable expansion (ctrl-x) actually work?

TCC 10.00.76 Windows XP [Version 5.1.2600]
TCC Build 76 Windows XP Build 2600 Service Pack 3


I believe in the old 4DOS days, ^X was the escape character. I still
have that configured. Is there any chance you do?

D:\>option escapechar
escapechar=↑

Curiously, either Ctrl key works for me, in spite of having only the
left Ctrl (and Alt) reserved for TCMD.

Does the Ctrl-X send a key code? I tested below using Ctrl-Q, since
Ctrl-X does not insert anything. The 17 (Ctrl-Q) listed below would be
24 if Ctrl-X just sent its code. Between the square brackets, press
the Ctrl-X key once.

D:\>echo %@ascii[â—„]
17


> | Ctrl-X will only expand the variable at the cursor, not all of the
> | variables on the line.

I don't get that behavior.

D:\>set Q*
Q1=one
Q2=two
Q3=three

D:\>echo %Q1 %Q2 and %Q3 please{Cursor is here}
I press Ctrl-X and the last line immediately changes to
D:\>echo one two and three please


On Wed, Sep 9, 2009 at 8:39 PM, dcantor <> wrote:

> ---Quote (Originally by rconn)---
> dcantor wrote:
>
>
>
> You've either not enabled the Ctrl key for the TCC window (Options /
> Configure Take Command / Tabs), or you have an existing Ctrl-X menu
> shortcut defined in Take Command. Â*(Right click on the menu and select
> "Customize".)
>
> Rex Conn
> JP Software
> ---End Quote---
> I do have left-ctrl enabled for Take Command, and there is nothing that I can find in keyboard customization menus that has Ctrl-X assigned.
>
> This is really mystifying. Â* Meanwhile, I've assigned F11 for this function (and that works), but I'd prefer a control character.
>
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
Re: Does variable expansion (ctrl-x) actually work?

Do you have any keystroke aliases that are in the way?

D:\>alias @*


On Thu, Sep 10, 2009 at 8:46 AM, Jim Cook <> wrote:

> TCC Â*10.00.76 Â* Windows XP [Version 5.1.2600]
> TCC Build 76 Â* Windows XP Build 2600 Â*Service Pack 3
>
>
> I believe in the old 4DOS days, ^X was the escape character. I still
> have that configured. Is there any chance you do?
>
> D:\>option escapechar
> escapechar=ââ€*‘
>
> Curiously, either Ctrl key works for me, in spite of having only the
> left Ctrl (and Alt) reserved for TCMD.
>
> Does the Ctrl-X send a key code? I tested below using Ctrl-Q, since
> Ctrl-X does not insert anything. The 17 (Ctrl-Q) listed below would be
> 24 if Ctrl-X just sent its code. Between the square brackets, press
> the Ctrl-X key once.
>
> D:\>echo %@ascii[â—„]
> 17
>
>
>
> ---Quote---
>> | Ctrl-X will only expand the variable at the cursor, not all of the
>> | variables on the line.
> ---End Quote---
> I don't get that behavior.
>
> D:\>set Q*
> Q1=one
> Q2=two
> Q3=three
>
> D:\>echo %Q1 %Q2 and %Q3 please{Cursor is here}
> I press Ctrl-X and the last line immediately changes to
> D:\>echo one two and three please
>
>
> On Wed, Sep 9, 2009 at 8:39 PM, dcantor <> wrote:
>
>
> ---Quote---
>> ---Quote (Originally by rconn)---
>> dcantor wrote:
>>
>>
>>
>> You've either not enabled the Ctrl key for the TCC window (Options /
>> Configure Take Command / Tabs), or you have an existing Ctrl-X menu
>> shortcut defined in Take Command. Â*(Right click on the menu and select
>> "Customize".)
>>
>> Rex Conn
>> JP Software
>> ---End Quote---
>> I do have left-ctrl enabled for Take Command, and there is nothing that I can find in keyboard customization menus that has Ctrl-X assigned.
>>
>> This is really mystifying. Â* Meanwhile, I've assigned F11 for this function (and that works), but I'd prefer a control character.
>>
>>
>>
>>
>>
> ---End Quote---
>
>
> --
> Jim Cook
> 2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
> Next year they're Sunday.
>
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
Re: Does variable expansion (ctrl-x) actually work?

Jim Cook wrote:
| TCC 10.00.76 Windows XP [Version 5.1.2600]
| TCC Build 76 Windows XP Build 2600 Service Pack 3
|
|
| I believe in the old 4DOS days, ^X was the escape character. I still
| have that configured.

I use 4DOS special characters, too. I have directives "NormalKey=ctrl-X" and
"VariableExpand=Ctrl-Y" in my .INI files.

At this time, when I long stopped using 4DOS, my main reason for not
switching to the new defaults is the ton of references to the old ones in my
batch files and aliases, though only the ParameterChar (&) is explicitly
present in any of them, since it has no pseudovariable representation. I
always use %= for EscapeChar and %+ for CommandSep in all files. I still
wish there were a pseudovariable for the ParameterChar, even if Rex
considers all of the special character pseudovariables obsolete.
--
Steve
 
Re: Does variable expansion (ctrl-x) actually work?

Do you have any keystroke aliases that are in the way?

D:\>alias @*


No keystroke aliases whatsoever. Ctrl-X is not defined as the escape character.

I tried ECHO %@ASC[<ctrl-x>] but the depression of Ctrl-X did not register. Interesting, I cannot enter Ctrl-X into anything in Take Command, but it works perfectly in every other application.

I've also discovered that other console applications, when run in a Take Command tab do not receive the Ctrl-X. Obviously Take Command is eating this character for some reason, but I have no idea how to find out what.
 
solved

<ctrl-x>I got an idea after writing the previous reply.

I went into Customize -> Keyboard and tried to assign Ctrl-X to Print...
It told me that Ctrl-X was already assigned and asked me if I wanted to remove the definition. I answered affirmatively, and then actually did assign Ctrl-X to Print... Then I removed that definition, and

lo and behold

Ctrl-X now can be seen by any application running in a Take Command tab
and, in particular, it works for VariableExpand in TCC.

Rex, it would be nice if there were a way to find out what a keystroke is assigned to. In my case, it must have been assigned to some function (in Customize -> Keyboard) that was not visible. Perhaps it was a function that was visible in some earlier build of the product, but no longer is.

Thanks to all for all the suggestions. It did eventually lead me to the solution.




</ctrl-x>
 
solved

dcantor wrote:
| I went into Customize -> Keyboard and tried to assign Ctrl-X to
| Print...

OK, I give up. I did not find "customize" in any TCMD / TCC menu. I also
tried Windows Explorer (WinXP SP3), Internet Explorer (IE8), Regional and
Language Options and Control Panel. Regional Options includes "key settings"
to change keyboard language, but found nothing else.
--
Steve
 
solved

On Thu, 10 Sep 2009 13:03:10 -0500, Steve Fábián <> wrote:

|OK, I give up. I did not find "customize" in any TCMD / TCC menu. I also
|tried Windows Explorer (WinXP SP3), Internet Explorer (IE8), Regional and
|Language Options and Control Panel. Regional Options includes "key settings"
|to change keyboard language, but found nothing else.
|--

View ... Toolbars/Menus ... Customize
--
- Vince
 
solved

On Thu, Sep 10, 2009 at 11:33 AM, vefatica <> wrote:

> On Thu, 10 Sep 2009 13:03:10 -0500, Steve Fábián <> wrote:
>
> |OK, I give up. I did not find "customize" in any TCMD / TCC menu. I also
> |tried Windows Explorer (WinXP SP3), Internet Explorer (IE8), Regional and
> |Language Options and Control Panel. Regional Options includes "key settings"
> |to change keyboard language, but found nothing else.
> |--
>
> View ... Toolbars/Menus ... Customize

Also, right-click anywhere on the File \ Edit toolbar will bring up
Customize as an option.

--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
solved

On 2009-09-10 20:33, vefatica wrote:

> |OK, I give up. I did not find "customize" in any TCMD / TCC menu. I also
> |tried Windows Explorer (WinXP SP3), Internet Explorer (IE8), Regional and
> |Language Options and Control Panel. Regional Options includes "key settings"
> |to change keyboard language, but found nothing else.
> View ... Toolbars/Menus ... Customize

Right-clicking on the toolbars themselves also gives a "Customize..." entry in its popup menu. :)
 
solved

vefatica wrote:
| View ... Toolbars/Menus ... Customize

Thanks Vince, found it. Since I normally run TCC only, I expected all
customization to be part of TCMD or TCC configuration. However, I realize
that many MS products split out the visual customization from "options" or
even "customization", though IIRC keystroke shortcuts are typically under
Tools ...

I do agree with the OP's desire to have a list of currently assigned
keystroke shortcuts available. It would be esp. nice if the keystrokes
intercepted by the OS (and thus invisible to TCMD / TCC ) were also
available, though I don't know if such a list were possible. Is there a
Windows API capable to report whether or not a specific key combination is
intercepted? I am currently struggling with choosing new shortcut keystrokes
for desktop objects I use to start programs (e.g., various TCC versions),
because a new alternate keyboard I plan to use occasionally uses the
alt-ctrl-key combination for many characters, which I have been using for
the desktop. I expect them to work when the current window is one of the MS
office ones, or Outlook Express, Firefox, or TCC, without interfering with
local window shortcuts.
--
Steve
 
solved

On Thu, 10 Sep 2009 14:36:56 -0500, Steve Fábián <> wrote:

|I do agree with the OP's desire to have a list of currently assigned
|keystroke shortcuts available.

Have you ever seen that in an app? I don't think I have. I don't think it
would be worth the (considerable) effort.
--
- Vince
 
solved

On Thu, Sep 10, 2009 at 1:21 PM, vefatica <> wrote:

> On Thu, 10 Sep 2009 14:36:56 -0500, Steve Fábián <> wrote:
>
> |I do agree with the OP's desire to have a list of currently assigned
> |keystroke shortcuts available.
>
> Have you ever seen that in an app? *I don't think I have. *I don't think it
> would be worth the (considerable) effort.

I believe UEStudio does (Advanced \ Configuration \ Toolbars / Menus \
Key Mapping \ Show Key Mapping in Editor) and I greatly appreciate it.



> --
> *- Vince
>
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
solved

On Thu, 10 Sep 2009 15:21:28 -0500, vefatica <> was
claimed to have wrote:


>On Thu, 10 Sep 2009 14:36:56 -0500, Steve Fábián <> wrote:
>
>|I do agree with the OP's desire to have a list of currently assigned
>|keystroke shortcuts available.
>
>Have you ever seen that in an app? I don't think I have. I don't think it
>would be worth the (considerable) effort.

I can think of a couple that do, usually in the form of a dialog that
allows you to change keys (and in some cases, displaying non-changeable
shortcut keys there too)

Whether this is worth implementing or not, I'm not sure.
 
solved

Yeah. I was going to say most editors have the ability to show the
keystroke mappings. Especially since most editors have the ability to
remap the keys to make their editor behave like other editors so users
don't have to relearn shortcuts.

-Scott

Jim Cook <> wrote on 09/10/2009 04:35:29 PM:


> On Thu, Sep 10, 2009 at 1:21 PM, vefatica <> wrote:
>
>
> ---Quote---
> > On Thu, 10 Sep 2009 14:36:56 -0500, Steve Fábián <> wrote:
> >
> > |I do agree with the OP's desire to have a list of currently assigned
> > |keystroke shortcuts available.
> >
> > Have you ever seen that in an app? *I don't think I have. *I don't
think it

> > would be worth the (considerable) effort.
> ---End Quote---
> I believe UEStudio does (Advanced \ Configuration \ Toolbars / Menus \
> Key Mapping \ Show Key Mapping in Editor) and I greatly appreciate it.
>
>
>
>
> ---Quote---
> > --
> > *- Vince
> >
> >
> >
> >
> >
> ---End Quote---
>
>
> --
> Jim Cook
> 2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
> Next year they're Sunday.
>
>
>
>
 
solved

vefatica wrote:
| On Thu, 10 Sep 2009 14:36:56 -0500, Steve Fábián <> wrote:
|
|| I do agree with the OP's desire to have a list of currently assigned
|| keystroke shortcuts available.
|
| Have you ever seen that in an app? I don't think I have. I don't
| think it would be worth the (considerable) effort.

Firefox and Outlook Express (both in Help); neither has dynamic assignment.
Of course, neither has as many keys predefined as either TCMD or TCC, which
are enumerated in tcmd.chm; however, none of the key mapping directives is
accepted by either the @OPTION function, or by the OPTION command in its
display mode, so there is no method available to retrieve the current
settings.
--
Steve
 
Re: solved

dcantor wrote:
| I went into Customize -> Keyboard and tried to assign Ctrl-X to
| Print...

OK, I give up. I did not find "customize" in any TCMD / TCC menu. I also
tried Windows Explorer (WinXP SP3), Internet Explorer (IE8), Regional and
Language Options and Control Panel. Regional Options includes "key settings"
to change keyboard language, but found nothing else.
--
Steve

Right-click on the menu bar in the Take Command main window and you get a drop-down with "Customize...".
 

Similar threads

Back
Top