mIRC Homepage
Posted By: Farcrada Button output. - 22/11/13 02:24 AM
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
Posted By: Wims Re: Button output. - 22/11/13 09:41 PM
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.
Posted By: sparta Re: Button output. - 23/11/13 06:49 AM
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
Posted By: Farcrada Re: Button output. - 23/11/13 03:13 PM
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
Posted By: Deega Re: Button output. - 25/11/13 01:35 AM
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 }
Posted By: Deega Re: Button output. - 25/11/13 01:38 AM
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 }
© mIRC Discussion Forums