Keywords for commands, functions, internal variables

Aug 3, 2016
376
9
Netherlands
For syntax highlighting in editors:

Does anyone know how to extract which variable functions and internal variables are available in a specific Take Command version?

The commands part is rather straightforward: after SETDOS /I* and PLUGIN /U* the ? command lists all internal commands.

I couldn't find something similar for functions and variables.

Sure, I wrote a script to extract those from the helpfiles, but I consider that secondary (by lack of a better word in my rather limited English vocabulary).
There is also the option to press F7 after "%@" or "%_" to get a list, but that's not a hardcopy (and not reliable; if you do this in TCC/LE, you also get the "Not in LE" functions/variables )
 
Last edited:
Aug 3, 2016
376
9
Netherlands
Thanks!

I do not have the permissions to view this page, but the keyword "Keywords" brings up a lot of similar questions. That will keep me busy for a while :-)

(I *did* search the forums for this, but apparently used the wrong "keywords". Thanks for sending me in the right direction!)
 
Last edited:
Aug 3, 2016
376
9
Netherlands
While cleaning out the debris of my Take Command experiments, I found a script to generate those keywords (a list of internal commands, internal variables and variable functions in 3 seperate files)
Completely forgot about that....

I downloaded the SDK (as suggested in one of the many threads about this subject), but that turned out to be outdated (TCMD17 keywords).
Eventualy I used the content of the Take Command Helpfiles to generate these keywords.

It can get those keywords from .CHM files and from TCHELP.exe. Here's how:


TCHELP.EXE:
  • Open TCHELP.exe and keep it opened!
  • Drag the "Whats New in Version 20" subject to the folder where this script resides (or the desktop; doesn't really matter) like this:
  • 2017-03-01 04_51_30-Drag.png
  • This creates a "What's New in Version 20.0.url" file (you can view the contents with a text editor)
    The name of this .url file is important, because a folder will be created with this same name, where the keywords will be put (for supporting multiple versions of TCMD)
  • Drag-Drop ([title]) the .url file on the GenerateKeywords script (or use the .url as a parameter on the prompt)
  • Wait a minute ...
  • In the created "What's New in Version 20.0" folder are your keyword files.
  • Close TCHELP.exe
  • Delete the .url file (it contains a unique ID; the next time (?) you have to create a new .url file.

TCMD.CHM

  • Drag-drop the .CHM file on the GenerateKeywords script (or use the .CHM as a parameter on the prompt)
  • The script uses the foldername of the .CHM (like:TCMD19) for the folder it creates where the keywords will be stored.
  • Wait a minute ...
  • In the created "TCMD19" folder are your keyword files, minus the internal commands.
  • Create those with a command like this (I'll save you the 20 seconds it costs to type this yourself :-) in the correct version (19 in this example):

(DO this in /P ? (DO that in /L %this (echo %that)) ) > Internal_Commands.txt

OR if DO isn's supported in older versions (error on TCMD11):
? | for %x in (@con) do for %y in (%x) do echo %y


Remarks

  • The script make use of GNU's WGET ([title]) . My version is 1.11.4, but I guess any version will do.
    You can unzip the package to a folder in your path or just in the folder of the GenerateKeywords script.
  • Especially for this forum I added some "UI" and errorhandling (a whopping 1 line of code extra!). Don't expect to much from that ...
 

Attachments

  • GenerateKeywords.btm
    2.1 KB · Views: 104
  • Keywords_V20.zip
    3 KB · Views: 100
  • Keywords_V11.zip
    2.5 KB · Views: 98
Similar threads
Thread starter Title Forum Replies Date
Charles Dye Updated _bat.schclass with v11 new commands/keywords Support 1
D TC Keywords Support 6
vefatica Console not redrawn in BTM or with multiple commands Support 4
Joe Caverly Documentation COMMANDS in Version 27 help Support 8
kb6ojs ALIAS with multiple commands? Support 9
R Long commands retrieved from command history have blank line when wrapped Support 20
vefatica Timing commands with $= in the prompt? Support 16
A Fixed v25 regression: Parameter expansion fails in piped commands Support 2
A Key Commands missing? Support 3
Dick Johnson New database commands Support 8
F Regexes in REN/MOVE/… commands seem to not work at all Support 3
gentzel Bug launching external commands in 20.11.43 Support 11
M Disable commands? Support 2
D Fixed 20.10 strangeness with external commands Support 9
thedave Problem chaining piped FIND commands in BTM Support 7
D Some commands are not displaying their command dialog Support 2
C MONITOR commands alter tab title when triggered Support 0
Alpengreis Documentation TC Help v18.x "Commands by Category" is incomplete Support 0
R How to? Launch and execute commands in tcmd.exe through MSBuild Script. Support 3
D WAD TASKBAR window commands confuses our friends at MS Support 4
Stefano Piccardi list of TCC commands for external editors Support 4
I tab completion with directory commands Support 7
I most used commands Support 2
mikea How to? TCC and ftp:// commands Support 7
R Override TCC internal commands Support 2
S Directory history entries from /S option of various commands Support 2
M A simple question related to the "dir" (and "pdir") commands... Support 5
R TC 13 / Using TCDIALOG to exit commands Support 4
J syntax problems multiple commands (command & command) Support 4
C User error with low level file* commands Support 8
S Need help to execute TCC commands on another system Support 6
electrotype keyboard shotcuts to send commands to a TCC tab? Support 8
L Vista 64 bits missing commands Support 1
deleyd Commands to launch Control Panel items? Support 10
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
Joe Caverly "Functions" in cmd.exe batch files Support 6
vefatica Library functions and line continuations? Support 4
Charles Dye Documentation Help Nits Forever: Checksum functions Support 0
Joe Caverly SETLOCAL removes Aliases and Functions Support 3
Joe Caverly @NAME supports library functions Support 2
Charles Dye Functions which no-one has ever tried to use.... Support 5
vefatica WHICH and @functions Support 2
vefatica Two @FUNCTIONs/aliases with the same name Support 4
C Documentation near or fully obsolete functions Support 7
Charles Dye Optional F parm in checksum functions Support 0
C coding functions and subroutines Support 9
rps Functions @year[date] @isowyear[date] help Support 7
mikea How to? TCC and XMLnodes/XMLxpath functions Support 0
Dan Glynhampton Are these two functions the same? Support 2
M How to? Logic in functions... Support 5

Similar threads