;MP3P.PLUGIN:MP3P Command Line Support v0.2b:Cynagen:Misc:This command line support plugin was inspired by fellow scripter Snowfairy who originally altered MP3P code to include command line support. Now featured in this plugin. Use /mp3pcl to invoke.:a:mp3pcl:0 alias mp3pcl { if ($readini(mp3psettings,mp3p,version) >= 2.95) { if (!$window(@MP3P)) { window -ek0 @MP3P | echo @MP3P $iif($readini(mp3psettings,mp3p,plugins) == yes,Command line ready...,Command line not ready... Plugins are disabled! Type "plugins enable" to enable them.) } if ($window(@MP3P)) { window -a @MP3P } } } on *:INPUT:@MP3P:{ if ($1 == help) { echo @MP3P PLAY Usage: PLAY [filename|playlist#] - If [filename] is specified, the filename will be played, if [playlist#] is specified, the song in the playlist with that number will be played, otherwise last loaded song will play. echo @MP3P STOP Usage: STOP - Stops currently playing song entirely. echo @MP3P PAUSE Usage: PAUSE - Pauses and unpauses (if paused) the current song. echo @MP3P NEXT Usage: NEXT - Skips the remainder of a playing song if playing, and goes to the next. echo @MP3P BACK Usage: BACK - Skips the remainder of a playing song if playing, and goes to the previous song. echo @MP3P PLUGINS Usage: PLUGINS [ENABLE|DISABLE] - If "PLUGINS" is called it will return the status of plugin usage. Specifying "ENABLE" will enable plugin use, "DISABLE" will disable plugin use, including this plugin. echo @MP3P LIST Usage: LIST - Displays the list of songs in the playlist. echo @MP3P CLEAR Usage: CLEAR - Clears the command line window. echo @MP3P ADD Usage: ADD [filename] - Adds the specified file to the playlist. echo @MP3P DEL Usage: DEL [playlist#] - Deletes the file numbered from the playlist. ;echo @MP3P Currently unavailable commands but coming soon: ADD DEL } if ($1 == play) { if ($2- != $null) { if ($isfile($2-) == $true) { echo @MP3P Loading and playing... $2- .signal -n mp3p.control.play $2- } if ($isfile($2-) == $false && $2 isnum && $2 <= $readini(mp3p.pls,playlist,numberofentries)) { set %mp3p-playlist $2 .signal -n mp3p.control.play } } if ($2- == $null) { echo @MP3P Playing... .signal -n mp3p.control.play } } if ($1 == stop) { .signal -n mp3p.control.stop | echo @MP3P Stopping... } if ($1 == pause) { .signal -n mp3p.control.pause | echo @MP3P $iif(%mp3p-paused == no,Unpausing...,Pausing...) } if ($1 == next) { .signal -n mp3p.control.next | echo @MP3P Skipping to next song... } if ($1 == back) { .signal -n mp3p.control.prev | echo @MP3P Skipping to previous song... } if ($1 == plugins) { if ($2 == $null) { echo @MP3P Plugins: $iif($readini(mp3psettings,mp3p,plugins) == yes,enabled,disabled) } if ($2 != $null && $2 == (enable || disable)) { writeini mp3psettings mp3p plugins $iif($2 == enable,yes,no) echo @MP3P Plugins: $+($2,d) } } if ($1 == list) { echo @MP3P Fetching list... set %cmd.listf 1 while (%cmd.listf <= $readini(mp3p.pls,playlist,numberofentries)) { echo @MP3P $iif($len(%cmd.listf) == 1,0) $+ %cmd.listf $+ . $readini(mp3p.pls,playlist,$+(Title,%cmd.listf)) inc %cmd.listf } unset %cmd.listf } if ($1 == clear) { clear @MP3P } if ($1 == add) { if ($isfile($2-) && ($right($2-,4) == .wav || $right($2-,4) == .mp3)) { mp3ppleditor add $2- echo @MP3P Added the file to the playlist } else { if (!$isfile($2-)) { echo @MP3P " $+ $2- $+ " is not a $iif($right($2-,4) != .wav && $right($2-,4) != .mp3,file & is not a wave or mp3 file.,file.) | halt } if ($right($2-,4) != .wav && $right($2-,4) != .mp3) { echo @MP3P The file is not a wave or mp3. } } } if ($1 == del) { if ($2 isnum && $2 <= $readini(mp3p.pls,playlist,numberofentries)) { mp3ppleditor del $2 } } } on *:SIGNAL:mp3p.disp.string:{ if ($window(@MP3P).hwnd) .timermp3pcmd -m 1 100 echo @MP3P $1- }