Command line

From Miranda NG
Jump to: navigation, search

Command line
No image
Filename CmdLine.dll
Author Cristian Libotean
Download links
Stable version: 32-bit, 64-bit
Development version: 32-bit, 64-bit

Important
This plugin will not work correctly when multiple instances of Miranda and the plugin are running at the same time. Do not run more than one instance of the plugin at the same time!

This plugin lets you control Miranda from the command line. It uses an additional executable file (MimCmd.exe) to pass command line arguments to Miranda. MimCmd.exe can be placed anywhere, it doesn't have to be in Miranda's main folder.


Available commands

Type mimcmd.exe help to get a list of available commands. To get help information for the specified command type mimcmd.exe help <command>.

Command Description Usage Parameters Note
awaymsg Changes away message either globally or per account. awaymsg <message> [<account>] <message> is the new away message, <account> is the account to set the away message for. awaymsg <message> sets the away message globally.
callservice Calls a Miranda service. callservice <service> (d|s)<wParam> (d|s)<lParam> The command will call Miranda <service> service using wParam and lParam as arguments; the first letter of the parameter must be either 'd' if the parameter is a decimal number or 's' if the parameter is a string. You can only pass numbers and strings as data. Invalid data passed to a service might cause Miranda crash.
clist Hides or shows the contact list window. clist (show | hide | toggle) clist prints the state of contact list window.
contacts Allows you to search/list contacts matching certain criteria. contacts list [<keyword> [account:<account>] [id:<id>] [status:<status>] [<keyword> [...]]] To search for a specific account use the keyword 'account:<account>'.
To search for contacts that have a certain ID use the keyword 'id:<id>'.
To search for contacts that have a certain status use 'status:<status>'.
<status>: offline, online, away, dnd, na, occupied, freechat, invisible, onthephone, outtolunch.
contacts list lists all your contacts.
Allows you to open message windows for specified contacts. contacts open [<keyword> [account:<account>] [id:<id>] [status:<status>] [<keyword> [...]]] contacts open opens message windows for all contacts that have unread messages.
db Allows you to manage database settings. db set <module> <name> (b|i|d|s|w)<value>
db delete <module> <name>
db get <module> <name>
<module> is the name of the module where the key should be located, <name> is the name of the key and <value> is the value to be written. A character must be placed before <value> in order to specify what kind of data to write:
  • b – byte,
  • i – integer (word),
  • d – double word,
  • s – string,
  • w – wide string.
exchange Notifies Exchange plugin to check for email. exchange check
help Prints help information for other commands. help [<command>] <command> is any command from the first column of this table. help without parameters lists available commands.
history Shows history or unread messages for a contact. history <command> <contact> <command> is one of the following:
  • unread – show unread messages for the contact,
  • show <contact> <start> <finish> – show history from event number <start> to <finish>.
Any negative number is interpreted as a relative index from the last event number +1 (so the last event for a contact is -1).
ignore Sets or removes ignore flags for the specified contacts. ignore (block | unblock) <contact> [<contact> [<contact> [...]]] <contact> is the contact to set/remove ignore flag for.
message Sends a message to the specified contacts. message <contact> [<contact> [<contact> [...]]] <message> <contact> has the following format: <name>[:<account>]. <name> is the contact display name or unique ID and <account> is an optional parameter representing the account of the contact (useful in case there is more than one contact with the same name). The message string cannot exceed 512 characters. You can use \n for new line (and \\n for \n). At least one contact must be specified – all parameters except the last one are considered recipients.
popups Disables or enables popups display. popups (disable | enable | toggle) popups prints the state of popups.
proxy Configures proxy settings either globally or per account. proxy (global | <account>) <setting> [<params>] <setting> is one of the following:
  • status (disable | enable | toggle),
  • server <proxy type> <server> <port>.
quit Closes Miranda. quit [wait] If wait is used then the command will return only when CmdLine plugin has been unloaded by Miranda.
setnickname Changes the user's nickname on the given protocol. setnickname <protocol> <new_nickname> <protocol> is the protocol to set new nickname for.
sounds Disables or enables sounds. sounds (disable | enable | toggle) sounds prints the state of sounds.
status Changes account status either globally or per account. status <status> [<account>] <status>: offline, online, away, dnd, na, occupied, freechat, invisible, onthephone, outtolunch.
<account> is the account to set status for.
status <status> changes the status globally.
version Shows Miranda's and CmdLine's version numbers. version If CrashDumper plugin is installed, the command shows its version information report.
xstatus Changes extended status either globally or per account. xstatus <xStatus> [<account>] <xStatus> is the new extended status. Possible values are: ...
<account> is the account to set extended status for.
xstatus <xStatus> sets the extended status for all accounts.
Not all accounts/protocols support extended status.
yamn Notifies YAMN plugin to check for email. yamn check