mIRC Home    About    Download    Register    News    Help

Print Thread
#151137 14/06/06 12:22 AM
Joined: Dec 2005
Posts: 18
A
AidanJT Offline OP
Pikka bird
OP Offline
Pikka bird
A
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

#151138 14/06/06 12:32 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
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

#151139 14/06/06 01:02 AM
Joined: Dec 2005
Posts: 18
A
AidanJT Offline OP
Pikka bird
OP Offline
Pikka bird
A
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.
#151140 14/06/06 03:32 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
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

#151141 14/06/06 03:33 AM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
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....
#151142 14/06/06 05:49 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
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)

#151143 14/06/06 09:35 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
It'd be a lot easier to just use a variable.

Code:
//set %linesep $readini($mircini,text,linesep)

#151144 14/06/06 10:56 AM
Joined: Dec 2005
Posts: 18
A
AidanJT Offline OP
Pikka bird
OP Offline
Pikka bird
A
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 smile

A bit hackish but it's the best option unless a $linesep identifier is ever added to mIRC.

#151145 14/06/06 10:13 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
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.

#151146 14/06/06 11:40 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I assumed he meant he didn't want to access it repeatedly.

#151147 15/06/06 04:44 AM
Joined: Dec 2005
Posts: 18
A
AidanJT Offline OP
Pikka bird
OP Offline
Pikka bird
A
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.


Link Copied to Clipboard