|
shortcut
#238189
06/07/12 08:06 PM
|
Joined: Nov 2011
Posts: 30
arc123
OP
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2011
Posts: 30 |
how to make a shortcut with 2 letters
like for making letter Ctrl +x for /mode # +im
|
|
|
Re: shortcut
[Re: arc123]
#238190
06/07/12 08:19 PM
|
Joined: Jun 2007
Posts: 933
5618
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
You cannot make key combinations in mIRC like Ctrl+x What you can do, however, is set up an alias for one of the F-keys. If you press Alt+R (or Tools > Scripts Editor...) and go to the Aliases tab, you can add the following code so pressing F2 will do what you want:
|
|
|
Re: shortcut
[Re: 5618]
#238191
06/07/12 10:19 PM
|
Joined: Feb 2003
Posts: 3,432
sparta
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
You cannot make key combinations in mIRC like Ctrl+x
I think you can do it, i belive i used a dll for that some years ago, "sendkey.dll" and i think it could send any key combination to mirc as a shortcut. Maybe something to look in to?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
Re: shortcut
[Re: sparta]
#238192
06/07/12 10:38 PM
|
Joined: Mar 2010
Posts: 144
Masoud
Vogon poet
|
Vogon poet
Joined: Mar 2010
Posts: 144 |
No DLLs needed. Sendkey {
var %a = $+(SendKeys,$ticks)
.comopen %a WScript.Shell
if (!$comerr) {
var %b = $com(%a,SendKeys,3,bstr,$1-)
.comclose %a
return %b
}
return 0
}
Nothing...
|
|
|
Re: shortcut
[Re: Masoud]
#238193
06/07/12 11:24 PM
|
Joined: Jan 2004
Posts: 1,314
Loki12583
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 1,314 |
That's nice, but not at all what he's asking for.
|
|
|
Re: shortcut
[Re: Masoud]
#238195
07/07/12 02:33 AM
|
Joined: Jul 2007
Posts: 1,129
Tomao
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
As far as that alias is concerned, it's designed to merely work with mIRC's built-in shortcuts. Correct me if I'm wrong.
|
|
|
Re: shortcut
[Re: Tomao]
#238199
07/07/12 05:44 AM
|
Joined: Jul 2006
Posts: 3,741
Wims
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 3,741 |
What do you mean? That alias will send the keys specified in $1- to the active window. It doesn't let you catch keys pressed on the keyboard
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
|
|
|
Re: shortcut
[Re: arc123]
#238226
08/07/12 07:20 AM
|
Joined: Nov 2011
Posts: 30
arc123
OP
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2011
Posts: 30 |
its not have to be the 2 ctrl + X i mean any 2 letters No DLLs needed. Sendkey {
var %a = $+(SendKeys,$ticks)
.comopen %a WScript.Shell
if (!$comerr) {
var %b = $com(%a,SendKeys,3,bstr,$1-)
.comclose %a
return %b
}
return 0
} need explain for how this can work
Last edited by arc123; 08/07/12 07:20 AM.
|
|
|
Re: shortcut
[Re: arc123]
#238227
08/07/12 07:28 AM
|
Joined: Jul 2006
Posts: 3,741
Wims
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 3,741 |
The only keypress you can catch with mirc (without using a dll) is the F-key plus the control, alt and shift key. An example about how to catch F-key has been given (you can read more about it using /help Function Keys) and you can use $mouse.key (/help $mouse) to know if alt is pressed.
Forget the sendkey alias, it's for something you can use to do what you want.
Last edited by Wims; 08/07/12 07:33 AM.
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
|
|
|
Re: shortcut
[Re: Wims]
#238233
08/07/12 03:31 PM
|
Joined: Jul 2007
Posts: 1,129
Tomao
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
That alias will send the keys specified in $1- to the active window. It doesn't let you catch keys pressed on the keyboard. Thank you, Wims.
|
|
|
Re: shortcut
[Re: Tomao]
#238234
08/07/12 04:46 PM
|
Joined: Jul 2006
Posts: 3,741
Wims
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 3,741 |
You're welcome  Forget the sendkey alias, it's for something you can use to do what you want. I meant "it's not something you can use to do what you want"
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
|
|
|
|
|
|