mIRC Home    About    Download    Register    News    Help

Print Thread
#25778 24/05/03 12:06 PM
Joined: Mar 2003
Posts: 63
N
NiCk2 Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 63
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

#25779 24/05/03 12:41 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
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.


Code:
//if ( khaled isgod ) echo yes | else echo no
#25780 24/05/03 06:47 PM
Joined: Dec 2002
Posts: 204
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
i am not sure but you might want to check out the on keydown section of the mirc help file. Specifically the $keyrpt identifier


keek: Scots - intr.v. keeked, keek·ing, keeks
To peek; peep.
#25781 24/05/03 06:59 PM
Joined: Dec 2002
Posts: 204
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
Never mind what i posted before that is for custom windows
Sorry my bad


keek: Scots - intr.v. keeked, keek·ing, keeks
To peek; peep.
#25782 24/05/03 10:06 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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
}


-KingTomato

Link Copied to Clipboard