mIRC Home    About    Download    Register    News    Help

Print Thread
#243455 22/11/13 02:24 AM
Joined: Aug 2013
Posts: 33
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Aug 2013
Posts: 33
Hello peeps!

I was wondering: Could I make a script for mIRC which would press a button (combination) (Say SHIFT (+ F1).)?
Like so:
Code:
on *:text:!button:#: {
  Press button x (and y).
}

Would this be possible or would I need to use some other event or...?

Thanks in advance and for taking the time to review this,
Farcrada

Last edited by Farcrada; 22/11/13 02:24 AM.
Farcrada #243461 22/11/13 09:41 PM
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
You can use SendKey to mimic keyboard inputs ( http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send.aspx )
Code:
alias sendkey .comopen a WScript.Shell | .comclose a $com(a,SendKeys,3,bstr,$1-)
/sendkey +{F1} would mimic shift+f1 on the keyboard, note that mirc might not be the active application when your event trigger.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Farcrada #243471 23/11/13 06:49 AM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Or you can use the "sendkey.dll", it working as it should, i using it and never got any problem with the dll.

http://www.mircscripts.org/archive.php?s...&perpage=50


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #243472 23/11/13 03:13 PM
Joined: Aug 2013
Posts: 33
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Aug 2013
Posts: 33
Thanks for all the replies! <3

From what I've gathered from them I can only let it mimic keys and not input them via mIRC. I tried making something for my friend that when I typed "!button" It'd input a button and would tab him to his mIRC instead of it just beeping.

Thanks anyway! <3

Wims #243523 25/11/13 01:35 AM
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Originally Posted By: Wims
note that mirc might not be the active application when your event trigger.


If it's a mirc alias (sF1) that's to be run you can just run that as a command.
Code:
on *:text:!button:#:{ sF1 }

Farcrada #243524 25/11/13 01:38 AM
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Originally Posted By: Farcrada
Thanks for all the replies! <3

From what I've gathered from them I can only let it mimic keys and not input them via mIRC. I tried making something for my friend that when I typed "!button" It'd input a button and would tab him to his mIRC instead of it just beeping.

Thanks anyway! <3

Look at "/help /showmirc"
Code:
on *:text:!button:#:{ showmirc -s }


Link Copied to Clipboard