Home
Features
How to Use
Download
Contact
Suggest Command
How to Buy

Commands

General

about
alt
background
clipboard
cls
cmd
crazy
curfol
eventlog
exit
export
f1 - f12
filedel
fileinfo
fileren
filesearch
lastcmd
listfonts
help
now
openurl
optvars
quit
run
set
showfile
textbgc
textcol
url2text
write

Keep Track

id3
loadktd
lyrics
notes
showktd
trackinfo

Keep Track Playing

addat
dbatch
ktdetails
ktpause
ktpl
ktplay
listartists
listbatches
listgenres
partist
partistn
pat
pbatch
pbatchn
pgenren
ptrack
randpl
rpas
sartist
strack

Batch

at
audio
batch
block
box
circle
end
line
picture
pixel
text
text2
video

 

martin2k Command - How to Use martin2k Command

Contents

Entering Commands

Scrolling Through Text

Customising Commands

Playing Music

Batch Files

Entering Commands

Commands are entered at the prompt (the flashing underscore (_) character).  Once you have entered your command, press the Enter key.  To cancel entering a command, press the Escape key.

By default, the F3 key is bound to the lastcmd command.  This means that when pressed, the last command entered will appear at the prompt.

Most commands will clear the screen before displaying their output; the exception to this is the Batch commands.

Right-click Menu

'Copy text': copies all text onto the clipboard

'Insert these coordinates': enters the coordinates into the command prompt (in the x,y format) at the point where the user pressed the right mouse button

Scrolling Through Text

Many commands (such as showfile) will allow the user to scroll through text that is displayed on the screen.  The following keys can be used in this mode:

  • Home - return to the top
  • End - go to the end
  • Page Up - go up one page
  • Page Down - go down one page
  • Up - go up one line
  • Down - go down one line
  • Escape - return to command prompt

In playlist mode, additional keys are available for playing music.  See ktpl for more information.

Right-click Menu

This mode has its own right-click menu:

'Copy all text': copies all text onto the clipboard

'Search...': opens a search dialog box to search for text.  If found, the program will scroll to the next line containing the text sought.

Search dialog box
Search dialog box

Customising Commands

By using the set, f1-f12 and alt commands, it is possible to create commands and bind keys so that commands can be executed as quickly as possible.

Set

With this command, you can create new commands and variables.  set is mostly useful when you want to execute long commands regularly without having to type them in every time.  You can create variables, which are replaced when the command is executed with the value of the variable.  The syntax for set is:

set [<assignment>] [<command/variable>]

Some examples:

Assignment Could be Set To Reason
ff run firefox Quick way to launch Mozilla Firefox
cm partist christina milian To play tracks by Christina Milian
picfol c:\documents and settings\Martin Allen\My Documents\My Pictures Faster way of referring to the My Pictures folder e.g. %picfol%\sky.jpg

F1-F12

The function keys can also be bound to commands.  By default, F1 is bound to 'help', F3 is bound to 'lastcmd' and F9 is bound to 'ktpause'.  The syntax is:

f# <command>

Alt

Alt key combinations can also be bound to commands.  The syntax of alt is:

alt <letter> <command>

Playing Music

martin2k Command includes the command line version of another program - Keep Track, and as such you must first create a Keep Track database if you want to play music with this program.  Once the database is created, use the loadktd command to load it into martin2k Command.  You will only have to do this once as the program will remember what database is loaded.  martin2k Command only uses Keep Track databases on a read-only basis.

Playlists can be created by searching for artists (listartists, partist, partistn, sartist), tracks (ptrack, strack) and batches (listbatches, pbatch, pbatchn).  If there is a group of specific tracks you want to play together, the easiest way is to use Keep Track to create a batch in the database.  You can add tracks to the current playlist with the addat command.

Use the ktpl command anytime to see and control the current playlist.  The next track in the playlist will start to play 5 seconds before the current one finishes.  When moving to different tracks in the playlist, the previous track will fade out for 5 seconds while the new track starts to play.

To sort tracks in a playlist randomly when they are created, use the command 'randpl y'.

Batch Files

A batch file (not to be confused with a Keep Track batch) is a list of commands saved in an external file.  These files can be loaded into martin2k Command using the batch command and are then executed in order.  The list of commands under the heading 'Batch' to the left of this site show the commands that were designed for batch files - in particular, the commands at and end, which can only be used in batch files.

One possible use of a batch file is to build a custom playlist using many 'addat' commands.

If a command is executed, which could potentially cause damage to the system, a confirmation message will be displayed.

at

This command executes a command after a certain number of milliseconds has passed since a batch file started executing.

'at' can be placed anywhere within a batch file, but it is best to place them at the beginning.  After an 'at' command has been encountered in a batch file, the only way to stop the file running is to press the Break key (unless it is able to stop itself with the 'end' command).

end

'end' stops the execution of a batch file.  If the batch file contains no 'at' commands, it will stop itself after all commands have been executed.  Otherwise it is a good idea to use an 'at' command to end a batch file after all other 'at' commands have been executed to save the user from having to press the Break key.


martin2k
Forum
Search
Keep Track

© Martin Allen 2007 - 2008