mIRC Home    About    Download    Register    News    Help

Print Thread
Button output. #243455 22/11/13 02:24 AM
Joined: Aug 2013
Posts: 33
F
Farcrada Offline OP
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.
Re: Button output. [Re: Farcrada] #243461 22/11/13 09:41 PM
Joined: Jul 2006
Posts: 3,582
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,582
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.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Button output. [Re: Farcrada] #243471 23/11/13 06:49 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
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,.) }
Re: Button output. [Re: sparta] #243472 23/11/13 03:13 PM
Joined: Aug 2013
Posts: 33
F
Farcrada Offline OP
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

Re: Button output. [Re: Wims] #243523 25/11/13 01:35 AM
Joined: Oct 2012
Posts: 164
D
Deega Offline
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 }

Re: Button output. [Re: Farcrada] #243524 25/11/13 01:38 AM
Joined: Oct 2012
Posts: 164
D
Deega Offline
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 }