Hinweis! Dieser Inhalt wurde noch nicht übersetzt und ist nur auf Englisch verfügbar.

Command line

The command line interface to MaxTo is new in version 2.0, and it is very powerful.

With MaxTo's command line, you can do anything you can do in a recipe; even run other recipes.

If you used the normal installer, the CLI works out of the (non-existent) box. If you used the ZIP archive, you will need to do some extra setup yourself.

Getting started with the CLI is easy, but getting to know all the commands may not be. For now, open up Command Prompt and type maxto.

MaxTo CLI version
Matches for your help query

launch             Launch a program
window center      Center window
window focus       Focus on window
window maximize    Maximize window to screen
window move        Move window
regions apply      Load preset
regions highlight  Highlight regions
license apply      Apply license
license remove     Remove license
license status     Check if MaxTo is licensed
service restart    Restart MaxTo services
service start      Start MaxTo services
service stop       Stop MaxTo services

Great, we got hold of MaxTo. Most of the options presented here are actually commands, so you can run these as if you were in a recipe.

Let's try centering the Command Prompt window on the current monitor.

C:\>maxto window center
Success: MaxTo.Core.Commands.Window.CenterCommand+Result

When you executed this command without arguments, it takes the foreground window (which is the Command Prompt window) and moves it to the center of the current monitor.

For each command, there is a detailed help page available. If you don't know how a command works, you can simply type maxto help <command>, and MaxTo will present your options.

C:\>maxto help window focus
MaxTo CLI version
Focus on window

Move the focus to a window in a specific direction.

maxto window focus
    [/Window <value>]
    [/Direction <value>]

/Window <value>     The window you want to receive the focus. If Direction is
                    specified in addition to this, it specifies the window to
                    use for the starting position.
                    You can find windows by specific the exact window title,
                    the exact window class, or the window handle (in
                    hexadecimal, formatted as "0xdeadbeef".

/Direction <value>  In which direction we should look for windows.

So if you want to move the focus to the window to your right, the correct command would be maxto window focus /Direction Right.