mIRC Homepage
Posted By: LittleJohn $$hfile - 25/08/08 10:53 PM
I have this line in one of my scripts
.&Play Wav:/sound $$hfile="Play a wav!" [ $mircdirsounds\ ] $me just played $filename

I was wondering if anyone could help me with adding the part in red to notice the channel with the Sound file name. I lookes in mirc help for $$hfile help and didnt find anything.
Posted By: RusselB Re: $$hfile - 25/08/08 11:17 PM
Since $hfile is not part of mIRC (unless it's a hold over from a much older version), then that is what we call a custom identifier, which, in turn, calls for information from an alias, in this case, called hfile.
Check your script for a line that reads:
Code:
alias hfile
or
Code:
alias -l hfile

If you don't have either of those, then you're missing part of the script.
Looking at that script, and checking the help file, it appears that someone has things a bit mixed up, as the /sound command is not meant for playing sounds. That's the /splay command.

Try replacing that line with
Code:
.&Play Wav: .splay $$sfile($wavedir)

and add the following to the code
Code:
on *:waveend:{
  .msg $active $me just played $filename
}
Posted By: LittleJohn Re: $$hfile - 25/08/08 11:35 PM
RusseB,

I believe the $$hfile causes the File dialog to open (must be an and old way of doing this) The /Sound is needed for the other chater to hear the sound being played.

if I use the Play wav as I posted the user can hear it if they have the file if they do not their system requests it. That all seems to work. the part I can not get working is to post the file name that was played.

Thanks for your reply
Posted By: Horstl Re: $$hfile - 26/08/08 02:11 AM
Code:
.&Play Wav: { var %file = $$sfile($wavedir,Select a file to play at $active,Play it!) | sound $qt(%file) just playing $nopath(%file) }

smile
Posted By: hixxy Re: $$hfile - 26/08/08 01:31 PM
Just a suggestion, but it might be worth trying identifiers like that quickly so that you know whether they're built-in or not, rather than throwing what ifs and buts.

A simple //echo -a $hfile="pick a file" will show you it's an outdated version of $sfile()
© mIRC Discussion Forums