mIRC Home    About    Download    Register    News    Help

Print Thread
$read and write help #237521 12/05/12 09:37 AM
Joined: May 2012
Posts: 10
S
Snowderblazer Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: May 2012
Posts: 10
i have the remote script

on @*:TEXT:!orders*:#Legija.udor: {
write D:\LegijaStrike\orders.txt orders: $2- } { msg $chan $nick : Orders Updated }
}

on *:TEXT:!do:#Legija.udor: {
msg $chan $read(D:\LegijaStrike\orders.txt)
}

the only issue i have is $read

nicks type !do and nothing appears
!orders work 100%

Re: $read and write help [Re: Snowderblazer] #237522 12/05/12 10:29 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
If you intend to output the complete text file, have a look at the /play command (/help /play).

Re: $read and write help [Re: Horstl] #237523 12/05/12 11:15 AM
Joined: May 2012
Posts: 10
S
Snowderblazer Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: May 2012
Posts: 10
on *:TEXT:!do:#Legija.udor: {
msg $chan play D:\LegijaStrike\orders.txt
}

i tried the above with play
does not work, however when i do

/play D:\LegijaStrike\orders.txt

it outputs the file

Re: $read and write help [Re: Snowderblazer] #237524 12/05/12 01:26 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Try
Code:
on *:text:!do:#Legija.udor: {
  play -m1 $chan D:\LegijaStrike\orders.txt 1500
}
-m1 prevents building a playback queue; 1500 is the line delay in milliseconds