mIRC Home    About    Download    Register    News    Help

Print Thread
little idea #98478 24/09/04 12:52 AM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
an $numlock that verifies if the numpad is on or off (and $capslock and $scrolllock) would be great. or does this feature already exists?


__________
dark_light @ irc.brasnet.org
Re: little idea #98479 24/09/04 06:54 AM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
i just forget to say about the /numlock on|off, /capslock on|off and /scrolllock on|off ..


__________
dark_light @ irc.brasnet.org
Re: little idea #98480 24/09/04 07:01 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
For now, you can use:

Code:
alias capslock {
  if ($com(SendKeys)) { .comclose SendKeys }
  .comopen SendKeys WScript.Shell
  .comclose SendKeys $com(SendKeys,SendKeys,3,bstr,{CAPSLOCK})
}
alias numlock {
  if ($com(SendKeys)) { .comclose SendKeys }
  .comopen SendKeys WScript.Shell
  .comclose SendKeys $com(SendKeys,SendKeys,3,bstr,{NUMLOCK})
}
alias scrolllock {
  if ($com(SendKeys)) { .comclose SendKeys }
  .comopen SendKeys WScript.Shell
  .comclose SendKeys $com(SendKeys,SendKeys,3,bstr,{SCROLLLOCK})
}


/capslock - same as pressing capslock.
/numlock - same as pressing numlock.
/scrolllock - same as pressing scrolllock.


New username: hixxy
Re: little idea #98481 24/09/04 07:23 AM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
Hum.. thanks

and for $capslock , you have some routine?


__________
dark_light @ irc.brasnet.org
Re: little idea #98482 24/09/04 07:24 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Nope, I can make a small dll if you want though smile


New username: hixxy
Re: little idea #98483 24/09/04 07:26 AM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
if you wish..

but i dont need it so much

edit: huum, i forgot to mention how you can send it to me. you can send it to tolkiendili@gmail.com , but maybe you have to rename the nameofdll.dll to nameofdll.dll.txt (gmail don't allow the user receive .exe files, and i think that it do not receive .dll too)

Last edited by Leoric; 24/09/04 07:51 AM.

__________
dark_light @ irc.brasnet.org
Re: little idea #98484 24/09/04 07:57 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
key.dll

Just to make the aliases work exactly the same as your request:

Code:
alias sendkeys {
  if (!$isid) {
    if ($com(SendKeys)) { .comclose SendKeys }
    .comopen SendKeys WScript.Shell
    .comclose SendKeys $com(SendKeys,SendKeys,3,bstr,$1-)
  }
}
alias capslock {
  if (!$isid) {
    if ($1 == on) && (!$dll(Key.dll,CapsLock,_)) { SendKeys {CAPSLOCK} }
    elseif ($1 == off) && ($dll(Key.dll,CapsLock,_)) { SendKeys {CAPSLOCK} }
  }
  elseif ($isid) { return $dll(Key.dll,CapsLock,_) }
}
alias numlock {
  if (!$isid) {
    if ($1 == on) && (!$dll(Key.dll,NumLock,_)) { SendKeys {NUMLOCK} }
    elseif ($1 == off) && ($dll(Key.dll,NumLock,_)) { SendKeys {NUMLOCK} }
  }
  elseif ($isid) { return $dll(Key.dll,NumLock,_) }
}
alias scrolllock {
  if (!$isid) {
    if ($1 == on) && (!$dll(Key.dll,ScrollLock,_)) { SendKeys {SCROLLLOCK} }
    elseif ($1 == off) && ($dll(Key.dll,ScrollLock,_)) { SendKeys {SCROLLLOCK} }
  }
  elseif ($isid) { return $dll(Key.dll,ScrollLock,_) }
}


Each of the three aliases will return 1 if the key is on, 0 if it's off.


New username: hixxy
Re: little idea #98485 24/09/04 08:05 AM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
Thank you grin


__________
dark_light @ irc.brasnet.org
Re: little idea #98486 24/09/04 08:13 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
yw smile


New username: hixxy