Visual IRC
Features & Screenshots
Download ViRC!
Scripts
Visual IRC Forum
Chat in Undernet #ViRC
Awards and Reviews
About the Author
About the Technology
ViRC Antique Shop
|
What's new in Visual IRC 2.0rc2?
Additions (22)
Bug fixes (13)
Changed features (7)
- ViRC.lib notices when you change your script path or filenames in client
setup, and automatically rehashes.
- New event: <OnCacheBitmaps>, called at startup and after
FlushBitmapCache. This is a good place to replace built-in bitmaps.
- ViRC.lib will automatically replace the built-in join/quit/etc bitmaps
with any corresponding files it finds in your image path:
_join.bmp, _part.bmp, _joinign.bmp, _partign.bmp,
_quit.bmp, _nick.bmp, _mode.bmp, _topic.bmp
If you release a color scheme for 2.0rc2 with new bitmaps, you can
simply include these files in an image folder, and reference it in your
scheme file. ViRC.lib will notice when you change your image path and
automatically recache the bitmaps.+
- New command: CacheBitmap <name> <hbitmap>. You can replace ViRC's
built-in TextOut images by using a 'name' of _join.bmp, _part.bmp, etc.
'hbitmap' is the value returned by $bitmap(filename.bmp).
- A scripted popup menu now appears when right-clicking a web hyperlink,
allowing you to either go to the URL or copy it to the clipboard. This
makes use of TMS's new OnHyperlinkPopup event.
- New function: $GetTimerServer(<timer name>) returns the ID of the
server that the timer is associated with, or -1 if not found.
- The script editor has buttons for event options and menu tree
merge options. If your script uses MergeMenu and you want the script
editor to recognize it, rename the source tree to the destination
tree's name followed by __MERGE (e.g., MT_MAINMENU__MERGE), then
move the MergeMenu line immediately after the last MenuItem for
the tree.
- ViRC will be drawn with themes under Windows XP.
- New included scripts: sounds.vsc (handles CTCP SOUND) and
smileys.vsc (shows graphical smileys).
- ViRC.exe now includes 48x48 icons.
- New exception handling for scripts. Now you can catch errors that
come up when working with files or OVS:
Try
@l $filename = $?="Enter a filename"
$stringlist.LoadFromFile $filename
Except
if [$ExceptClass] == [EInOutError]
MessageBox I/O error prevented me from loading the file: $ExceptMsg
else
MessageBox Unexpected exception: $ExceptClass was raised at $ExceptAddr ($ExceptMsg)
endif
EndTry
Use a 'finally' part to run some code whether an exception was
raised or not. You can omit the 'finally' or 'except' part, or both
(to ignore all exceptions).
@l $cur_dir = $GetCurrentDir()
Try
ChDir $getpath()
MkDir $?="Enter a new directory name"
Finally
ChDir $cur_dir
Except
MessageBox Couldn't make new directory: $ExceptMsg
EndTry
In an 'except' part, you can reraise the exception, so it
will be caught by an outer Try..EndTry statement, with the Raise
statement. Or you can raise your own exceptions at any time:
Alias OUTER
// ignore any exception that occurs in Inner1
Try
Inner1
EndTry
EndAlias
Alias INNER1
Try
Inner2
Except
// display "Inner1 caught Exception - an exception from Inner2"
MessageBox Inner1 caught $ExceptClass - $ExceptMsg
// re-raise the exception for Outer to catch
Raise
EndTry
EndAlias
Alias INNER2
Raise an exception from Inner2
EndAlias
- Inline graphics for text windows: \S@bmp:filename[:alt text]\S
If supplied, the alt text will be copied to the clipboard when the
graphic is selected. You can also make a graphical script link:
\S@slbmp:command:filename[:alt text]\S
<filename> can be either a FULL PATH to the bmp file, or a bitmap
handle returned by $bitmap(filename.bmp). ViRC will automatically
look in your image path if you use $bitmap(filename.bmp).
- Tables for text windows. These are basically like custom tab stops;
there are separate commands to create a table definition, select
an active table, and move to the next column within a line of text.
All the commands are used by outputting them to a text control, so
tables should be defined in <OnCreateWindow>, not <OnStart>.
define (or redefine) a table: \S@td:<name>:<col1>[:<col2>:...]\S
- Name must be a single word. A table only has to be defined
once, then it can be used in any window. Each <colN> sets
the width of a column; it can specify pixels ('50px'),
characters ('25ch'), or let ViRC choose a size ('?'). The
/f flag ('50px/f', '25ch/f') tells ViRC not to resize the
column, even if some text won't fit.
(re)define a wrappable table: \S@td/w:<name>:<col1>[:<col2>:...]\S
- Just like regular @td, but text shown with a wrappable table
is allowed to wrap to the next line.
select a table for one line: \S@uset:<name>\S
- This must appear at the beginning of the line. The named
table definition will be used for this line only.
select a table for several lines: \S@pusht:<name>\S
- The named table will be added to the top of the "table stack",
and it will be active until it is removed with @popt. Each
window has its own table stack.
display text with columns: \S@col\S<some text>
- Moves to the next table column before displaying the text.
The previous column may be resized if it wasn't defined with
/f and if the text that has already been displayed is wider
than the column's original size.
unselect a table: \S@popt\S
- Removes the most recently selected table from the stack.
unselect all tables: \S@popt/a\S
- Clears the table stack. When the stack is empty, the default
table (set with @setdeft) will be used.
set a default table: \S@setdeft:<name>\S
- Sets the named table as the default table, so it will be
active whenever the table stack is empty. ViRC.lib uses a
default table to line up nicks, so you should only change
the default table if you know exactly what you're doing.
- New function: $replace(<text> <from1> <to1> [<from2> <to2>...])
returns the text after replacing each "from" string with the
corresponding "to" string. All parameters must be quoted as list
items, and they are case sensitive. The replacement is done on a
single pass through <text>, so $replace(ABC A X X Z) will return
"XBC", not "ZBC". $replace(ABCD A foo ABC bar) will return "fooBCD",
not "barD", because the leftmost from/to pairs are replaced first.
- '@ ${foo} = bar', '-@ ${foo}', etc. are supported.
- https:// and irc:// URLs are highlighted.
- The server list can now be mapped as !ServerList.
- CTCP SOUND support is now included as an add-on script, sounds.vsc.
- New OVS event utilities (in virc.lib):
// add an event handler to an object. any existing handlers will
// still run, but this will replace an existing handler with the
// same ID (first_box).
@e+ $button.OnClick = first_box, MessageBox You clicked the button!
// add another, now both boxes will appear when you click it
@e+ $button.OnClick = second_box, MessageBox You clicked at $time()
// remove the first handler
@e- $button.OnClick = first_box
// list all handlers
foreach ($id,$code; $eventhandlers($button.OnClick))
MessageBox handler "$id" runs "$code"
endforeach
- New function: $upeval(<text>) evaluates the text in the previous
local variable context, so a called alias can access its caller's
local variables. (This is used by @e+ and @e-.) For example:
Alias FOO
@l $secretnumber = 17
Bar
EndAlias
Alias BAR
MessageBox The secret number is $upeval($$secretnumber).
EndAlias
- New commands: 'SetEventLine <text>' and 'AbortEvents'. SetEventLine
lets an earlier event change the parameters that will be given to
later events. AbortEvents stops event processing after the current
event finishes. For example, to ignore all /msgs from Mr2001, and
change everything LuceNT says to uppercase:
Event PRIVMSG_test -before "% PRIVMSG"
if [$nick] == [Mr2001]
AbortEvents
else if [$nick] == [LuceNT]
SetEventLine $0 $1 $2 :$upper($strtrim($3-))
endif
EndEvent
- Event options to run before/after other events, use variables in
the activation mask, and more. New event definition syntax:
Event <name> [-before|-after] [-eval] [-exact] [-case] [-regexp] "<mask>"
<code>
EndEvent
-before: the event will run before the event's message is displayed
(either internally or by a priority-matching event). all matching
'before' events will be run in the opposite order they were added
(that is, newest first), unless one of them calls FallThrough,
which will skip all remaining 'before' events.
-after: just like -before, but runs after the message. the order is
still newest first. this shouldn't be combined with -before.
-eval: the mask will be evaluated when it is being matched against
a server line (caution: if you put a function call in the event
mask, the function will be called A LOT). use this to match your
current nick, for example, instead of the nick you had when the
event was defined.
-exact: the mask will have to match the entire server line. that is,
"% JOIN" will not match ":Mr2001 JOIN #virc" if -exact is used.
also, the event mask won't be evaluated when the event is set,
although it will still be evaluated at match time if -eval is used.
-case: the mask will be case-sensitive.
-regexp: the mask is a unix-style "regular expression" rather than
a $wildmatch() mask. any subexpressions enclosed in parentheses
will be available to the event handler in the $matches array:
the mask ":\w+ PRIVMSG (#\w+) :(.*)" will put the channel name in
$matches[1] and the message in $matches[2]. the mask will not be
evaluated when it is set, since some regexp syntax collides with
ViRC's attribute codes.
- UltimateIRCD's "channel admin" flag (*nick) won't confuse ViRC's
nick list.
- The script editor won't write a MenuTree block if the only item is
<DoubleClick>.
- $GetWindowID() works for all window types.
- <OnDCCFinished> is fired when closing a DCC chat window.
- '^Msg =nick text' correctly hides any text displayed by
<OnMyQueryText>.
- The DCC progress bad should appear correctly for large files.
- !Application's Active property is now readable.
- The script editor doesn't prompt to save when you view a <DoubleClick>
menu item without making any changes.
- The userlist loads correctly from INI files.
- $listquote() now escapes strings containing tabs and CR/LF.
- Fixed an array parsing bug.
- MergeMenu now copies hints correctly.
- Making the server hostname edit box empty, or calling /server with no
parameters, will now connect to the previous server instead of giving
an error.
- Opening server windows is faster.
- String expressions can now use nested square brackets:
if [$array[$key]] == [foo]
...
endif
@l $x = []
if [$x] == [[]]
MessageBox Naturally!
endif
- Built-in menu trees in the script editor are now merged by default.
This means you can add items to a menu simply by, well, adding them.
- The script editor shows a warning when you omit an event mask.
- RightAlt+Num no longer switches windows, since right Alt is used for
typing symbols on non-U.S. keyboards. Use left Alt instead.
- The server list and server import/export forms are now resizable, and
the tree views won't expand automatically if there are more than 15
items to show.
- File dialog boxes ($opendialog(), etc.) now start in the current
directory.
Change log history:
|