mIRC Homepage
Posted By: arc123 shortcut - 06/07/12 08:06 PM
how to make a shortcut with 2 letters

like for making letter Ctrl +x for /mode # +im
Posted By: 5618 Re: shortcut - 06/07/12 08:19 PM
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:
Code:
/F2 /mode # +im
Posted By: sparta Re: shortcut - 06/07/12 10:19 PM
Originally Posted By: 5618
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?
Posted By: Masoud Re: shortcut - 06/07/12 10:38 PM
No DLLs needed.
Code:
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
}
Posted By: Loki12583 Re: shortcut - 06/07/12 11:24 PM
That's nice, but not at all what he's asking for.
Posted By: Tomao Re: shortcut - 07/07/12 02:33 AM
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.
Posted By: Wims Re: shortcut - 07/07/12 05:44 AM
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
Posted By: arc123 Re: shortcut - 08/07/12 07:20 AM
its not have to be the 2 ctrl + X

i mean any 2 letters

Originally Posted By: Masoud
No DLLs needed.
Code:
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
Posted By: Wims Re: shortcut - 08/07/12 07:28 AM
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.
Posted By: Tomao Re: shortcut - 08/07/12 03:31 PM
Originally Posted By: Wims
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.
Posted By: Wims Re: shortcut - 08/07/12 04:46 PM
You're welcome smile

Originally Posted By: Wims
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"
© mIRC Discussion Forums