mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2007
Posts: 6
G
Griff67 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2007
Posts: 6
I currently use the /play -b command to paste data from my clipboard to multiple mIRC channels which is great. But I get whispers from folks looking for all the older information to be sent back to them (ie they ether restarted or cleared and now have lost the history).

I was thinking that if I pasted my data to my own channel that I could somehow echo all the contents of my history of that channel to the person asking for it.. I can't find a way to have the play command read what I have in a channel...

So I thought, maybe I could have the clipboard appended to a file each time I use my macro with the /play -b.. I keep getting told that mIRC can't access the file.

So I tried just using .play filename.txt, figuring that I could just manually append the text to the file each time. But I can't get it to play the text file either.


My question is, can I have the play command write to a text file the contents of the clipboard like it writes to the channels? And what is the proper syntax for using the /play filename.txt?

I would like to be able to make it into an alias so that when Bob asks me for all the temp reports for the day, I can hit F12 and have it spew the contents of the temp file at Bob in his whisper channel.

Joined: Feb 2007
Posts: 75
T
Babel fish
Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Interesting Question, here is a snipped I came up with:

Code:
Alias Copy_me {
  window @Database
  play -be @Database
  var %lines = $play(@Database).lines
  savebuf -a %lines @Database pastedb.txt
}


Basically the above code plays the the clipboard to a custom window and when it's done, it is saves what was played to that window to a file named pastedb.txt, which you can play back to a person using a standard play command.

If you paste me your current code, I could adapt the snipped to suit your needs, but hopefully the above code is enough to get you started smile


GigIRC Network Admin
irc.gigirc.com
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Personally, I think the easiest way to do this, is to have logging active for the channels (if you don't already), then play the log file.

Joined: Jun 2007
Posts: 6
G
Griff67 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2007
Posts: 6
I can't seem to get the /play filename.txt command to work. Is there some trick to it that I don't know?

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Everything you need to know is in the help file. smile

/help Playing Files

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What are you using as a command to play the file? Don't forget that you need a location to play to (chan/nick) and a valid file (including path if it's not in mIRC's folder).


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2007
Posts: 6
G
Griff67 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2007
Posts: 6
It was one of those "oops" mistakes.
I didn't see anything in the HELP file about having to enclose the file name in quotes so now it works very well.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Anything you do with files that have spaces has to be done with quotes. Otherwise, there is no way to know when the file ends and when additional information begins.

The only exception to this rule is when you use identifiers because the ()'s show where the filename is.

Example:
$read(c:\program files\mirc\versions.txt,1)

Note that you can use $qt() to put quotes around stuff when needed.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard