mIRC Home    About    Download    Register    News    Help

Print Thread
/play to a @window ? #39649 04/08/03 03:51 PM
Joined: Jun 2003
Posts: 36
E
elroyK Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jun 2003
Posts: 36
Is it possible to play a text file to a custom window instead of a channel or nick ? or with another command ?

Re: /play to a @window ? #39650 04/08/03 03:51 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
/play @window?


new username: tidy_trax
Re: /play to a @window ? #39651 04/08/03 03:55 PM
Joined: Jun 2003
Posts: 36
E
elroyK Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jun 2003
Posts: 36
/play only works on nicknames or channels. not custom windows

Re: /play to a @window ? #39652 04/08/03 03:58 PM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
The help file says that /play can only be used on # or ? windows, or Status with the -s switch.

Use this /play -e @Test blah.txt 500

Re: /play to a @window ? #39653 04/08/03 04:14 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
Code:
alias aplay {
  var %i 1
  if (!$window($eval(@ $+ $gettok($1-,2,64),2)).x) { /window -a $eval(@ $+ $gettok($1-,2,64),2) }
  while (%i <= $lines($gettok($+(",$1-,"),1,64))) {
    $iif($read($gettok($+(",$1-,"),1,64),%i) == $null,goto next,echo $eval(@ $+ $gettok($1-,2,64),2) $read($gettok($+(",$1-,"),1,64),%i))
    :next
    inc %i
  }
}


i tested it on:
/aplay readme.txt @test
/aplay <filepath> <window>

Last edited by pheonix; 04/08/03 04:31 PM.

new username: tidy_trax
Re: /play to a @window ? #39654 04/08/03 04:25 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
depending on what you are attempting to use /play for, /loadbuf may work.


------
deep down, i'm really superficial.
Re: /play to a @window ? #39655 04/08/03 04:43 PM
Joined: Aug 2003
Posts: 17
C
Clubfoot Offline
Pikka bird
Offline
Pikka bird
C
Joined: Aug 2003
Posts: 17
there is a command made intended for this called /filter

Re: /play to a @window ? #39656 04/08/03 06:21 PM
Joined: Jun 2003
Posts: 36
E
elroyK Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jun 2003
Posts: 36
thanks, i'll use loadbuf.

Re: /play to a @window ? #39657 04/08/03 08:41 PM
Joined: Jul 2003
Posts: 35
R
root Offline
Ameglian cow
Offline
Ameglian cow
R
Joined: Jul 2003
Posts: 35
alias playwindow {
if ($window(@playwin)) {
window @playwin
}
%i = 1
while (%i <= $read(file.txt,0) {
aline @playwin $read(file.txt,%i)
inc %i
}
}

Re: /play to a @window ? #39658 04/08/03 08:50 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
using $read(file.txt,0) is almost always a bad idea. this only returns the total number of lines if the first line of the file is a number. $lines(file.txt) is a more reliable alternative.


------
deep down, i'm really superficial.