| Home | Download | Forum | Bug Tracker

|  | v1.4.0

XMenuBar
XMenuBar is a command implemented to replace the mIRC menubar using XPopup menus.
XMenuBar Marking and Callback
Just like with XDialog, you must "mark" the mIRC menubar prior to using XMenuBar. To mark the mIRC menubar, use /xmenubar -M and specify a callback function of your choice. The callback function will only be passed 1 parameter, and that is the MENU_ID. The menu ID is sent to the callback function to allow customisation of event flow. To stop mIRC from processing the menu command, return $true from the callback alias. An example of a simple callback function would be:
    alias xmenubar_cb {
        ;// Prevent user from accessing Help -> Contents
        if ($1 == 190) return $true
    }
Special Menus and Menu IDs
The callback parses menu clicks before mIRC gets a chance to process them. If the custom XPopupMenu has an ID which matches the ID of an existing mIRC menu item, it can be used to call the mIRC functionality. For example, the menu ID for the mIRC Options dialog is 159. If you used /xpop -a and specified the ID 159 and added the XPopup menu to the XMenuBar, the item will open up the mIRC Options dialog when clicked. Additionally, there is a special menu called the scriptpopup menu. This allows you to add the original mIRC scriptable popup menu on your XMenuBar. The usage of the other special menus (mirc and mircbar) has been disabled for the XMenuBar. Note: For custom menu commands which are specific to only your script, it is advised you use an ID starting from 15000. This is to prevent any clashes in existing IDs and XPopup menu items. Please do not create confusing or misleading menus! Below is a list of special menu IDs for those wishing to redesign mIRC's menubar. Note: The list was compiled from mIRC v6.31.
File
Special ID | Description
101 | Connect
102 | Disconnect
104 | Select Server (Alt+E)
105 | Exit
View
Special ID | Description
110 | Menubar
111 | Toolbar
112 | Switchbar
210 | Treebar
131 | Notify List (Alt+N)
132 | Urls List (Alt+U)
133 | Colors (Alt+K)
134 | Font
Favorites
Special ID | Description
141 | Add to Favorites
142 | Organize Favorites (Alt+J)
Tools
Special ID | Description
150 | Channels List (Alt+L)
203 | Scripts Editor (Alt+R)
151 | Send File (Alt+S)
152 | Chat (Alt+C)
154 | Received Files
155 | Log Files
156 | Address Book (Alt+B)
157 | Online Timer (Alt+I)
159 | Options (Alt+O)
Window
Special ID | Description
170 | Tile Horizontal
171 | Tile Vertical
172 | Cascade
173 | Arrange Icons
174 | Group
175 | Order
176 | Close (Alt+Z)
Help
Special ID | Description
190 | Contents (F1)
191 | Search (Shift+F1)
192 | Latest News
193 | Message Board
194 | About mIRC
195 | Register
/xmenubar Commands
The /xmenubar command is used to replace the mIRC menubar.
/xmenubar -a
This command adds a menu to the XMenuBar.
Syntax: | /xmenubar -a [MENU] [LABEL]
Example: | /xmenubar -a xpMenuName DCX Menu /xmenubar -a scriptpopup Custom
Parameters:
MENU | This is be either the name of the XPopup menu or scriptpopup.
LABEL | The label to display for this menu on the XMenuBar.
/xmenubar -d
This command removes a menu from the XMenuBar.
Syntax: | /xmenubar -d [MENU]
Example: | /xmenubar -d xpMenuName
/xmenubar -g
This command replaces the mIRC menubar with an empty XMenuBar.
Syntax: | /xmenubar -g
Example: | /xmenubar -g
/xmenubar -l
This command allows you to change the XMenuBar label for a specific menu.
Syntax: | /xmenubar -l [MENU] [NEW_LABEL]
Example: | /xmenubar -l xpMenuName Something Else
/xmenubar -r
This command resets the original mIRC menubar.
Syntax: | /xmenubar -r
Example: | /xmenubar -r
/xmenubar -M
This command marks the menubar and defines a callback function.
Syntax: | /xmenubar -M (CALLBACK)
Example: | /xmenubar -M xmenubar_cb
Note. If CALLBACK is not specified, this will reset the mIRC menubar.
$xmenubar Properties
The $xmenubar identifier is used to retrieve information about the DCX XMenuBar implementation.
$xmenubar().menu
Returns the name of the menu added to the XMenuBar.
Syntax: | $xmenubar(N).menu
Example: | $xmenubar(3).menu
Parameters:
N | The index of the menu.
Note. If N is 0, this property retrieves the total number of menus in the XMenuBar.
| /xmenubar -a -d -g -l -r -M $xmenubar() menu

Contact | © 2005-2007 | Last Updated: 25th December, 07