Play

From Scriptwiki
Jump to: navigation, search

The Play command 'plays' a file by reading its contents in various ways, such as directly to a channel, or to an alias.

play [-aescpbn q# m# f# rl# t#] [alias] [channel/nick/stop] <filename> [delay]

You can use /play to open up the play dialog, and it has almost all the features as the command. Play command in it's simplest form: /play c:\text\testing.txt

Above command plays the file testing.txt to the active window (channel/query), and the default delay is 1000ms (1 second), empty lines are treated as a delay. If you are using mIRC's flood protection, /play will send all lines through the flood protection.

-a switch makes /play use specified alias instead of /msg or /notice.
-e switch allows you to echo out the text to a window as it would be sent to the server.
-s switch allows you to play commands to the status window while offline. If you do not specify the -s switch then you must be connected to a server to use the /play command.
-c switch forces mIRC to interpret lines as actual commands instead of plain text (like perform).
-n switch makes the play command use /notice instead of /msg.
-p switch indicates that this is a priority play request and should be placed at the head of the queue for immediate playing. The current play request will be paused and will resume once this play request is finished.
-q# switch specifies the maximum number of requests that can be queued. If the queue length is already larger than or equal to the specified number then the play request is ignored.
-m# switch limits the number of requests that can be queued by a specific user/channel. If the user/channel already has or exceeds the specified number of requests queued then the play request is ignored.
-b switch plays text in the clipboard to a window. The text is temporarily saved to a file playqN.txt, which is deleted once playing is completed.
-r switch forces a single line to be chosen randomly from a file and played.
-l# switch forces the specified line-number to be read from a file and played.
-f# switch plays the whole file starting from the specified line.
-t switch forces mIRC to look up the specified topic in the file and play all lines under that topic. For example:

Note:
The -q# and -m# switches only apply to a /play initiated via a remote definition, not by you. For switches -rlf the first line in the file can be a single number specifying the number of lines in the file, this speeds up the process of reading the file.

You can use the $pnick identifier in commands which identifies the nick/channel to which you are currently playing.
To stop the playing of a file and clear the play queue you can use /play stop.

See also