hixxy
-
Posts
72 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by hixxy
-
-
timer still evaluates pipes ( | ).. I was not talking about !. The same example you posted unfortunately still evaluates the | symbol.
//.timer 1 1 echo -a hahha | hahha
/vs/
//echo -a hahha | hahha
returns the same result (error): "hahha - invalid command"
You must be doing something wrong, because it works fine for me:
//topic # test $chr(124) test | timer 1 1 echo -a $!chan( # ).topic
Output:
* Timer 1 activated
(13:23:54) * hixxy changes topic to 'test | test'
test | test
* Timer 1 halted
The example you posted is not the same as what I gave you.. for your example to work of echoing a pipe as plain text you would need to do this:
//timer 1 1 echo -a hahha $!chr(124) hahha
Or:
//timer 1 1 echo -a hahha $!(|,) hahha
Use the $chr value for the pipe. I don't remember it off hand. Find it like this.
//echo -a . $asc(|)
Same problem as I demonstrated in my earlier post, you would need to use $!chr(124)
-
FYI you could have just done this:
.timer 1 1 hadd cProt TOPIC $+ # $!chan( # ).topic
Timers evaluate everything twice (once at the time of the execution of the /timer command, and once again at the time the actual timer fires)... so you need to make sure anything you pass to it is escaped.
You can see what I'm talking about by typing these two lines of code in your status window:
//echo -a $!me
* this echoes the literal text "$me"
//.timer 1 1 echo -a $!me
* this echoes your nickname.
-
The problem with your $iif() statement is that you have closed the bracket too early:
did $iif($did(96).text) == $null,-b,-e) $dname 97
I have highlighted the brackets in different colours so you can see which ones are matching brackets and which aren't. You need to remove the second blue bracket in order for you to have a bracket match.
As for your code, it seems fine. The $left() thing you're doing doesn't make a lot of sense but it shouldn't cause any problems with your code. Maybe the problem lies elsewhere, try posting the entire on dialog code block.
-
For starters, $dname only works in a dialog event. Not in a lone alias like your update alias.
When correcting people you should make sure that you're correct first.
Identifiers like $nick, $chan, $dname, $did, etc, are passed on to any custom aliases that are called from within an event definition where that identifier was filled.
You can check this by using the following code:
dialog t { size -1 -1 300 300 } on *:dialog:t:init:*: update alias update echo -a $dname
Then just type "/dialog -m t t" without the quotes and you should see the letter "t" (the dialog name) echoed in the active window.
-
Perhaps vista is stricter then, but this is also the way things should've been done on XP and earlier OS's as well.
-
It's not a change to support vista, it's a change to become an application that's compliant with Windows. If you run mIRC from a non administrator account then you may find that it doesn't have permission to write to the Program Files folder, however it IS allowed to write to the Application Data folder or Roaming folder.
The only thing that has changed is the location of the directory, you can still use $mircdir as long as everything has been installed correctly. You don't need to use the location of the exe.
-
you need to use the $chr for [ and ]
if ($chr(91) $+ * $+ $chr(93) iswm $1-)
etc
No you don't.
//if ([*] iswm [x]) { echo -a WEJKDIKSDJH }
-
Seeing as they both have a common message in the kicks ("Banned for <time>") you could always try this.
on !*:kick:#:{ if ($knick == $me) && ($regex($1-,/banned for (\d++)(?= |$)/i)) { .timer 1 $regml(1) join $chan } }
-
There's no reason why it should be staying open, but your code is a bit yuck. The way you've written it will trigger the script if somebody types !joins or !parts. I'd use something like this instead:
on admin:text:!join ?*:#: join % $+ #$2 on admin:text:!part ?*:#: part % $+ #$2
-
but - as usual - it doesn't align the codelines like mirc does -.-
What do you mean?
a {
b {
c
}
}
Becomes:
a { b { c } }
When you hit the "{ }" button. What else are you talking about?
-
One another thing i need to know....
suppose there is a .txt or .ini file in script folder... and there are multi lines in it...which can may poetry,jokes or anyother stuff...
how wud script read every line from specified file on command?
like
On *:TEXT:!readsug:#:/msg # S \rTahoma;0 (*) 
 (*) $+ $read Complaints/suggestion.ini
it will read only one msgs ...it wont go to next line...
but i want to make script read all lines ...after finishing one it should go to next line till last line and msg to room...
on *:text:!readsug:#:{ var %handle = handle $+ $ticks, %file = complaints\suggestion.ini if (!$isfile(%file)) { msg $chan There is no suggestions file to read from. } else { .fopen %handle %file if (!$ferr) { while (!$feof) { msg $chan $fread(%handle) } .fclose %handle } } }
-
well at least now you know you could use on me:JOIN:#: { } to trigger the code only when you join
No you can't. "me:" is an event prefix (much like !, & and ^), not a user level, so you would have to use this:
on me:*:join:#:{ }
However, he wanted to do something when he joined, but something else when somebody else joined, so his own code was perfectly fine for that purpose.
-
Perhaps the line doesn't end in a CRLF, which would cause no bytes to be read into &x. Try using sockread -fn instead.
What The Gate Keeper recommended should stop the error, but it might mean that you miss data.
TGK: Fyi, you could use $sockbr there instead of $bvar(&x,0)
-
Wrong.
What you need to do is this:
"PRIVMSG %#TESTROOM :S Tahoma;0 First Line" & Chr(239) & "Second Line"
He is not wanting to send a crlf, but rather to make the next line appear on a new line in an msn web chatroom.
I see, well I wouldn't know about that. But you can send multiple messages the way I showed, which is just as good.
-
Ok, so, I'm a bit confused on what your saying. If I had a code
on ^*:TEXT:*:#:[ tokenize 32 $vstrip($1-) echo $chan $nick : $1- haltdef }
and I wanted to halt incoming text, I could put it between tokenize and echo? The way I was always taught is that anything your trying to halt or return, it should go to the end of that string of code. Then again, I'm sure me and you were both taught different ways, which makes scripting unique.
Yeah, I was taught the right way
/halt will stop the current scope and also all calling scopes. So if you did this:
alias a { b | c } alias b { halt } alias c { echo -s b }
Then call /a, /c will never be called because /b uses /halt, which not only halts /b, but also /a (because /a is what called /b).
/return will only stop the current scope:
alias a { b | c } alias b { return } alias c { echo -s b }
In this, /c will be called, because the /return in /b only stops /b, not /a too, so processing can continue and /c will be called.
/haltdef is completely different, and doesn't do anything even anywhere near similar to what /halt or /return do. In fact, the only similarity it has with /halt is the name.
You can put /haltdef anywhere you like. Add this to remote:
on *:sockopen:google:{ haltdef | echo -s * This still triggers }
Now type:
/sockopen google google.com 80
You'll see a message in the status window, which shows that /haltdef did not halt processing in that scope.
-
Haltdef ALWAYS goes at the end of an input or text code. As you can see from mine, it does a few things. It checks to see if the wildcard for / is there, which enables you to do two // for force entering commands into mIRC. It also sets a variable(%p) that checks for the users status (Owner, Host, Voice, Nonvoice) and sets it as a prefix for the actual echo. I find it easier to do that way then to keep doing ifs, elseifs to check for owner/host/etc status.
I don't know where you read that, but it doesn't matter where /haltdef goes as it doesn't halt anything like /return or /halt does.
-
Okay, it doesnt seem to have anything to do with encoding.
This is the string I am sending....
"PRIVMSG %#TESTROOM :S Tahoma;0 First Line" & Chr(10) & "Second Line"
Are we assuming this should work?
What I get on the screen is this...
BotNick : S Tahoma;0 First Line
Nothing else.
That will not work because CRLFs are used to delimit commands in the IRC protocol, like most others. This means that to send multiple lines to a channel you will have to issue multiple PRIVMSG commands, like so:
"PRIVMSG #channel :Line one" & Chr(13) & Chr(10) & "PRIVMSG #channel :Line two" & Chr(13) & Chr(10)
Chr(10) by itself is just a line feed. You must also use a carriage return - Chr(13)
-
I am speaking from experience with MSN and an empty mIRC. I had weird errors of no channel and such. When I traced it back it turned out that mIRC was dropping the channel name. When I removed the % it worked fine. Then I looked in Nuclear and Vincula and saw that they did this as well. They removed the % and then put it back on when sending to the server. This was just my experience working with mIRC and MSN where the room names were %#roomname. So I figured it was a universal issue considering I had no scripts loaded in my mIRC.
You're being pretty vague about what "exactly" caused these errors. I have given you code that shows you do not need to use $chr(), and also shown you that you can pass %#blah as a parameter without having mIRC evaluate it. I'm not sure exactly what you did to get the error, but it was down to a scripting error.
-
Because mIRC uses % for variables and so has issues sometimes using % in room names. (One of the reasons MSN OCX sucks)
I understand all of that, but what I gave him works fine. Try typing this in mIRC:
//echo -a % $+ test
You will see "%test" in the active window. This shows that mIRC has in fact NOT evaluated the string as a variable. The same can be used for channels: % $+ #chan
You could also use $(%#chan,0) or $eval(%#chan,0), but whichever way you use (% $+ #chan being the shortest), there's no need to use two $chr()s
For instance. If you called an alias named testing and wanted to include the $nick and $chan:
If the channel had %# to start with mIRC wouldn't process it and so $1 would be the $nick and there would be no $2.
The typical way connections handled this was to remove $chr(37) to move the info around and then when sending it to the server, add it back on.
No, that is wrong.
alias test { echo -a $1 }
Now type this (exactly this) in the status window: /test %#x
You will see "%#x" come up. The "echo -a $1" will only evaluate $1 once, which will turn it into %#x, you would have to evaluate it again to get the value of that variable. For mIRC to do what you're saying, you would have to change the /test alias to this:
alias test { echo -a $eval($1,2) }
You have probably ran into problems with calling aliases on a timer or something which has misled you, but that is because timers evaluate everything an extra time.
-
this will do it
/msg $chr(37) $+ $chr(35) $+ b-Room Blah
$chr(37) = %
$chr(35) = #
$+ = put item before and item after together as one
Why use $chr() when you can just use the actual characters like I did?
-
The windows media player object model has functions to do with closedcaptioning. I never knew what closed captioning was so I never took a look at it, but you understand how to use $com it might be worth taking a look at the object model documentation on Microsoft's website.
-
From command line:
/msg %#channel
(note I'm only using ONE slash here).
From remote:
msg % $+ #channel
-
Cheers That was the 151 byte version though.
I think more people would've entered if they knew how to translate the text. Don't let it put you off trying more
-
151 byte non-regex version:
alias c var %i $len($1),%r | while $mid($1,%i,1) { %r = $+($iif($v1 !isalnum,$v1,$chr($calc(219-$asc($v1)))),%r) | dec %i } | return $left(%r,$len($1))
69 byte regex version:
alias d return $regsubex($1,/([a-z0-9])/gi,$chr($calc(219-$asc(\t))))
I'm not sure if regex is banned from challenges here like it is most other places, so I've done two versions
$c(xzm blf tfvhh dszg gsrh rh?) = can you guess what this is?
$d(xzm blf tfvhh dszg gsrh rh?) = can you guess what this is?
Pipe (|) Processing
in General IRCd
Posted
You're right, $!(|) works fine
Try this mate:
As you will see it throws a "b unknown command" error.
The way to get around this is by using $!chr(124)
//timer 1 1 echo -a a $chr(124) b evaluates $chr(124) to plaintext "|" when the /timer command is first executed, then plaintext "|" is evaluated to special meaning "|" at the time that the timer fires.
Using my version,
//timer 1 1 echo -a a $!chr(124) b evaluates $!chr(124) to "$chr(124)" when the /timer command is first executed, then $chr(124) is evaluated to plaintext "|" at the time that the timer fires.