|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
I'm thinking that there's a remote event that I can't find, or anything else, that triggers when you hit any key, this is kind of hard to explain...so, i'll try my best: I'm have the editbox of a channel active and I hit the letter 'e' on the keyboard, and, it goes into the editbox, it would echo 'whatever'. hope anyone who reads this understands, please let me know if you don't understand, i'll be glad to try and be more specific and even have to get screenshots if I have to. Thanks!
Last edited by Kurdish_Assass1n; 17/12/06 02:18 AM.
-Kurdish_Assass1n
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
only thing that occurs to me, is the ON INPUT event. If this isn't what you're thinking of, please clarify, and (if possible) get screenshots of what you're trying to do.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, lets say I just typed the letter 'H' and the number '1' came up. The 1 and the H are just examples i'm using, so, like..the first letter i hit, it will perform a command, like echo. Example:
Last edited by Kurdish_Assass1n; 17/12/06 04:18 AM.
-Kurdish_Assass1n
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Here is an examle for you.
on *:input:*: {
if ($1 == e) {
echo -a $2-
halt
}
}
If you type: e $calc(5+5) It will echo in your active window: 10 In other words, it saves you from typing //echo -a Of course, you could just make an /e alias, but that does mean you have to type / as well. Anyhow, I think you had more in mind than just saving some typing, so just use this example to get you where you want.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, basically, this is what i'm trying to do, this is why i'm wanting to know if this is possible..If anyone here has been on MSN , AOL, or Yahoo Messenger, you'll know what i'm talking about. I have this client that this Program uses, called XBConnect, and, what i'm trying to do like, when I hit any letter, it will say 'Nick is typing a message'. so, I'm not looking for something that count's my letters or anything, i'm just wanting to know if someone is typing something. Basically, i'm trying to make the '......is typing a message' thing that MSN has.
-Kurdish_Assass1n
|
|
|
|
Joined: May 2005
Posts: 449
Fjord artisan
|
Fjord artisan
Joined: May 2005
Posts: 449 |
You'd have to script (or otherwise implement) some kind of behind-the-scenes communication between the clients so that whenever you were typing, your script would send a message to the other person, in a format that both parties would use so that the other script knew someone was typing. I'm not sure the best way to go about that. You could use a special CTCP action when you're typing, but that would most likely flood.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
I know how I would do this, i already have it all planned, except for the first part, i don't know any part of scripting that does what i'm wanting it to do. where it performs a command the first time you hit a key. sort of like KEYDOWN
-Kurdish_Assass1n
|
|
|
|
Joined: Sep 2003
Posts: 156
Vogon poet
|
Vogon poet
Joined: Sep 2003
Posts: 156 |
/help on keydown
türkçe biliyormusun
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
I need this to work for a PM (Private Message) and not a custom window. Please help if you can. Thanks again.
-Kurdish_Assass1n
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Well, like you know, KEYDOWN is for custom windows. If you want it from the editbox, I'd probably suggest a timer that checks $editbox($active) every second for text.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Sep 2003
Posts: 156
Vogon poet
|
Vogon poet
Joined: Sep 2003
Posts: 156 |
yea your right. good idea.. he have to check editboxes every milisecs.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
thanks Riamus2, I'll try that.
-Kurdish_Assass1n
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, this is what I have come up with, I have used echo for right now so I could test it, what's happening is I don't want to keep on sending messages to the other person saying 'Typing-Message: $true/$false' because I might get killed for flooding. so, is there a way to make this happen only once
on *:ACTIVE:?: {
if (*!*@XBConnect.com* iswm $address($active,2)) {
;Since it's going to be for Team-XBC ^^
timercheck -m $+(100,$str(00,6)) 430 check
}
}
on *:ACTIVE:#: {
if ($timer(check)) { timercheck off }
if ($timer(msg)) { timermsg off }
}
alias check {
if ($len($editbox($active)) == 1) { echo -ag Typing-Message $true }
; This stops on two, which is good. ^^
if ($len($editbox($active)) < 1) { echo -ag Typing-Message: $false }
; THis doesn't stop on 0, which is bad ^^
}
Examples:
-Kurdish_Assass1n
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Set a variable and check it before sending the text.
alias check {
if ($len($editbox($active)) >= 1) {
if (%Typing != $true) {
echo -ag Typing-Message $true
}
set -u15 %Typing $true
}
else {
if (%Typing) {
echo -ag Typing-Message: $false
unset %Typing
}
}
}
This will only display $true once and only $false once. As a note, the way you had the $true part, if you typed 2 letters before it checked, it wouldn't display $true because it wouldn't be == 1. Note: Although it shouldn't be needed, I put -u15 to unset the %Typing variable just to prevent possible problems. It should unset automatically anyhow, but I like being thorough.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok Riamus2, thanks :D, I'll try it..Always coming to my rescue :P, lol
-Kurdish_Assass1n
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, thanks Riamus2, what you gave me worked perfectly. I have found another problem though :|
alias check {
if ($left($1-,1) != $chr(47)) {
if ($len($editbox($active)) >= 1) {
if (%Typing != $true) {
.msg $active Typing-Message: $true
}
set -u15 %Typing $true
}
else {
if (%Typing) {
.msg $active Typing-Message: $false
unset %Typing
}
}
}
}
I added the second line.. if ($left($1-,1) != $chr(47)) { but, it acts like the if statement is true, which it isn't, CHR 47 = / I don't want it to say i'm typing a message if I'm using / at the beginning.
-Kurdish_Assass1n
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
What is the value of $1- ?
Looking at the rest of the code, the only value I can see being used is the result from $editbox($active). Unless you are sending some value when you call /check, $1- will be $null which is indeed != $chr(47).
-genius_at_work
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
What is the value of $1- ?
Looking at the rest of the code, the only value I can see being used is the result from $editbox($active). Unless you are sending some value when you call /check, $1- will be $null which is indeed != $chr(47).
Yeah, use this: if ($left($editbox($active),1) != $chr(47)) {
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
I would go further:
var %text = $editbox($active)
if ($len(%text) >= 1) && ($left(%text,1) != $chr(47)) {
Note that I reversed the conditions, too. Also looked like there was a space missing between one of the ) { pairs (in the OP).
Last edited by Sais; 21/12/06 11:20 PM.
Sais
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, got it working, thanks guys. But, I found yet another problem with my script, I'm almost done with it though. Code:
on ^*:TEXT:*:?: {
if (Typing-message: $false == $1-2) {
mtitle $titlebar
echo -a Testing
haltdef
}
if (Typing-message: $true == $1-2) {
mtitle $titlebar ------------------------------- $active Is Typing A Message. --------
echo -a Testing-1
haltdef
}
}
ok, it does every command here, the haltdef, the echo -a Testing[-1], but, it does not do the mtitle part, but, when I use it just normally type it, it works, so, the alias 'mtitle' isn't messed up, but, it's not working for some reason, why is that? Also, sorry for making so many posts/threads on this topic. ------------------------------------------- Full Code Just In Case:
on *:ACTIVE:?: {
if (*!*@XBConnect.com* iswm $address($active,2)) {
.timercheck -m $+(100,$str(00,6)) 430 check
}
}
on *:ACTIVE:#: {
if ($timer(check)) { .timercheck off }
}
alias check {
if ($left($editbox($active),1) != $chr(47)) {
if ($len($editbox($active)) >= 1) {
if (%Typing != $true) {
.msg $active Typing-Message: $true
}
set -u15 %Typing $true
}
else {
if (%Typing) {
.msg $active Typing-Message: $false
unset %Typing
}
}
}
}
on ^*:TEXT:*:?: {
if (Typing-message: $false == $1-2) {
mtitle $titlebar
echo -a Testing
haltdef
}
if (Typing-message: $true == $1-2) {
mtitle $titlebar ------------------------------- $active Is Typing A Message. --------
echo -a Testing-1
haltdef
}
}
alias mtitle { dll " $+ $scriptdirmtitle.dll $+ " mtitle $1- }
alias mtitlebar { return $dll( " $+ $scriptdirmtitle.dll $+ " , mtbar , 0 ) }
alias mChan { if ($1 ischan) { mSet $1 Channel: -[ $+ $1 $+ ]- Population: -[ $+ $nick($1,0) $+ ]- Modes: -[ $+ $iif( $chan($1).mode , $chan($1).mode , n/a ) $+ ]- Topic: -[ $+ $iif( $chan($1).topic , $ifmatch , none) $+ ]- } }
alias mSet { if ($1 ischan) { dll " $+ $scriptdirmtitle.dll $+ " mchan $window($1).hwnd $strip($2-) } }
alias mtabout { dll " $+ $scriptdirmtitle.dll $+ " mtabout }
on :*:load: {
if ($version < 5.9) { echo $colour(info) -s *** mtitle cannot be used, you need mIRC 5.9 or higher | unload -rs $script | return }
echo $colour(info) -s *** mtitle v1.3 by Kintar0
echo $colour(info) -s *** mtitle successfully loaded...
.timer 1 1 mtabout
}
-Kurdish_Assass1n
|
|
|
|
|