|
|
Joined: Dec 2005
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 18 |
Hi folks, I'm wondering if there's an identifier for getting/setting the Line Sperator specified by the user in mIRC options: Other->Line Seperator
If not, can you think of an alternate method of acheving the same effect. I've been drudging through the mIRC help file looking for a solution to no avail.
Regards, Aidan
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
I don't know if you can set it easily. You can get it with a simple $readini on mirc.ini. If you want to use the separator, you can use something like this:
/echo -se This line is surrounded by the separator character.
If the separator character is the last line before you use the command, an additional separator will not be added before the new text.
-genius_at_work
|
|
|
|
Joined: Dec 2005
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 18 |
Well, part of my script is overriding mIRC's default handling of whois replies by redirecting it to an @Whois window, I have that part more or less complete, I'm trying to polish it off by seperating replies with the line seperator in the users mIRC options (and to prefix script info to the status window). If I go the readini route, I'd have to constantly flushini and reread the ini file, or something like it, not terribly efficent. Which is why I would have prefered an identifier or some other means of reading it directly from mIRC's memory.
*edit* there is the /linesep command, but that only prints a line seperator by itself, unless there's an identifier i havn't picked up yet that will catch the output of a command?
Last edited by AidanJT; 14/06/06 01:07 AM.
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
I don't know about any $linesep identifier. I think it's been suggested many times before.
-genius_at_work
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 417 |
Then you can use this
/echo [email]-@e[/email] @whois This line is surrounded by the separator character.
or you can just add it into the raw command like this This will add a - at the start of a whois
raw 311:*: { /echo -@ @whois - /echo -@ @whois $2- }
if you want it at the end of a who is then you could use
Raw 318:*: { /echo -@ @whois $2- /echo -@ @whois - }
Or you could do it for each of the Raw commands you wish to add
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
alias linesep {
if (!$isid) { linesep $1- | return }
var %return,%win
while ((!%win) || ($window(%win))) { var %win = $+(@hidden.window.,$ticks,$r(1000000,1999999)) }
window -hn %win
linesep %win
var %return = $line(%win,1)
window -c %win
return %return
:error
} Or if u know you have a @whois window, and you know its last line isnt a line sepeartor (becuase u have just previously written to it) you could just go linesep @whois | var %linesep = $line(@whois,$line(@whois,0)) | dline @whois $line(@whois,0)
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
It'd be a lot easier to just use a variable. //set %linesep $readini($mircini,text,linesep)
|
|
|
|
Joined: Dec 2005
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 18 |
DaveC, your code snippet looks like just the trick, I can use a timer to refresh the variable using that alias, much obliged  A bit hackish but it's the best option unless a $linesep identifier is ever added to mIRC.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
LOL like u think i would actually use that linesep alias i wrote?
Your right I would just pull it from the ini, but he was going on about not wanting to have to access the file, so theres a non file access method.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
I assumed he meant he didn't want to access it repeatedly.
|
|
|
|
Joined: Dec 2005
Posts: 18
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 18 |
the problem with pulling it from the ini is that it's not relavent to the users current settings as mIRC only flushes its settings back to disk on exit. For someone that keeps mIRC running and tucked into their systray when they aren't using it, that can be annoying.
|
|
|
|
|
|