mIRC Homepage
Posted By: NiCk2 FX keys... - 24/05/03 12:06 PM
Hi, I would like to know if anyone has any ideas how I could make my script do different things depending on the time I stay pressed on a FX (where X is between 1 and 12) key.
If I stay longer than a second then it opens a dialog, if it's under a second then it kicks someone for example.
I don't think this is possible, maybe if I work with "one press" "two press" it's possible. That is to say, the first time I press down the key, it waits a second. If I press it again, then it does something different than if I don't press it again within the one second lap of time.
Thank You in advance for any help, if ever you have understod me lol smile
Posted By: theRat Re: FX keys... - 24/05/03 12:41 PM
DLL?
or just use sF1 & cF1 etc. aliases?

There is a feature suggestion about on keydown/up working on other windows than custom @windows, if Khaled implements this you can use the $keyrpt identifier to do it.
Posted By: keeker Re: FX keys... - 24/05/03 06:47 PM
i am not sure but you might want to check out the on keydown section of the mirc help file. Specifically the $keyrpt identifier
Posted By: keeker Re: FX keys... - 24/05/03 06:59 PM
Never mind what i posted before that is for custom windows
Sorry my bad
Posted By: KingTomato Re: FX keys... - 24/05/03 10:06 PM
As best as I can see, you could do a "double-press" sort of function. Ex:

/f1 {
/set -u0 %delay 200
if (%f1.press == $null) {
/set -u1 %f1.press $ticks
.timerf1 -m 1 %delay /f1.sclick
}
else if ($calc($ticks - %f1.press) < %delay) {
.timerf1 off
/f1.dclick
}
}

/f1.sclick {
/echo -a SClick
}
/f1.dclick {
/echo -a DClick
}
© mIRC Discussion Forums