mIRC Home    About    Download    Register    News    Help

Print Thread
#213149 19/06/09 03:01 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

How can i make something (event,alias,etc..) that when i click everywhere into the mIRC program with the left click to play a sound (click.wav)

any ideas? , thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
There's no event for "left click anywhere in mIRC", but to play a sound:

/help /splay

You can generally change your windows options to have a click sound. You should set the sound there.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I Can't add any DLL or anything else that when the TARGET is into my mIRC to play a sound?

Edit: I saw this into many script's before but i can't remember the script's names.

Last edited by westor; 19/06/09 06:05 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You can write a dll to do this.

You should probably be concentrating on adding actual functionality to your script rather than adding pointless bells and whistles like a "click sound".


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Normally I would agree, but if the DLL/script is complete, and working flawlessly, unless the bells & whistles break the code, I can see no reason not to add them.

Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
Quote:
I Can't add any DLL or anything else that when the TARGET is into my mIRC to play a sound?
Get cwnd.dll and use :
Code:
alias soundclick {
  if (!$1) noop $dll(cwnd.dll,subclass, soundclick $window(-2).hwnd 0 soundclick)
  elseif ($1 == stop) noop $dll(cwnd.dll,sfree, soundclick)
  elseif ($3 == LBUTTONDOWN) echo -a click
}
/soundclick enable it, /soundclick stop disable it

Last edited by Wims; 19/06/09 11:31 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Originally Posted By: Wims
Quote:
I Can't add any DLL or anything else that when the TARGET is into my mIRC to play a sound?
Get cwnd.dll and use :
Code:
alias soundclick {
  if (!$1) noop $dll(cwnd.dll,subclass, soundclick $window(-2).hwnd 0 soundclick)
  elseif ($1 == stop) noop $dll(cwnd.dll,sfree, soundclick)
  elseif ($3 == LBUTTONDOWN) echo -a click
}
/soundclick enable it, /soundclick stop disable it


I try this but doesn't seem to work i put the Dll into my mIRC "Dlls" folder and i pressed /soundclick enable i left click anywhere into my mIRC and didn't hear anything


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Do you have your sounds enabled in mIRC?
If so, try listening very carefully, as there's a chance that the sound is just a quick "click" or "beep" from the computer speaker.
This type of sound, while generated, can easily be lost if there's almost any background noise.

I'm not familiar with the DLL, so I don't know if there might be a way to change what it uses for the returned sound. Eg: a small wav file, rather than the computer "beep"

Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Yeaph, now working but it not working for dialogs or when i pressed the left button from my mouse into the mIRC , it seems to working only in any opened WINDOWS, How can i make it to play a sound when i click everywhere into mIRC (e.g: buttons,menus,checkbox,radiobox,tabs,Script editor,etc..) and to work when i open any mIRC default window (e.g: mIRC Options).

Edit: And when i restart/exit my mIRC program when i open again and click it doesn't click , so i must add and
Code:
ON *:START: { soundclick }
code for working

Last edited by westor; 21/06/09 12:23 AM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
You must have the most annoying mIRC ... ever? grin

Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Not anoying just i want to add this into my script also i will add an ENABLE and DISABLE menu for the users that don't want to hear the sound.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
Actually the code I gave you does not play a sound or a beep, just echo 'click' in your active window (or status window in some case), you have to play the sound.

As for others window, yeah, the code itself is just watching if you click in any window that belong to the mirc main window ($window(-2).hwnd), if you want to catch any click in any place or in any window related to mirc, you have to 'watch' for all of this window.I'll see what I can do


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Originally Posted By: Wims
Actually the code I gave you does not play a sound or a beep, just echo 'click' in your active window (or status window in some case), you have to play the sound.

As for others window, yeah, the code itself is just watching if you click in any window that belong to the mirc main window ($window(-2).hwnd), if you want to catch any click in any place or in any window related to mirc, you have to 'watch' for all of this window.I'll see what I can do


Thanks for your time Wims i will be waiting for..


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard