Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | |||
irc:mirc [2016/05/16 21:45] – erreur32 | irc:mirc [2022/11/08 16:43] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | |||
+ | **mIRC: Custom Window** | ||
+ | |||
+ | Prior to mIRC 5.5, this was the main method for making a GUI (graphical user interface). | ||
+ | |||
+ | A custom window is just another window, like a channel window or a server window. The following commands allow you to modify, add, and change things in that custom window of yours. | ||
+ | |||
+ | ==== Creating a window ==== | ||
+ | |||
+ | |||
+ | you can do anything in the window of yours, you will need to actually open it. The " | ||
+ | |||
+ | /window @< | ||
+ | |||
+ | ==== Basic Window Commands ==== | ||
+ | |||
+ | |||
+ | With the following commands you can manipulate a window in number of way: | ||
+ | /titlebar @window < | ||
+ | |||
+ | This command will change the window' | ||
+ | /renwin < | ||
+ | |||
+ | This command will change the @windowname to a new @windowname. An optional title can also be specified in this command. | ||
+ | /aline [color] < | ||
+ | |||
+ | This command will simply add a line of text to the end of the window. The [color] is the color number for the line. | ||
+ | |||
+ | * -n prevents from adding duplicates | ||
+ | * -i indents the just added line | ||
+ | |||
+ | |||
+ | / | ||
+ | |||
+ | This command is used to change the color of the Nth line with the new [color]. | ||
+ | |||
+ | * -m when coloring nicknames in a channel nicklist, and makes mIRC also color the nick in channel messages. | ||
+ | * -r reset a nickname color in a channel listbox to the default color | ||
+ | |||
+ | |||
+ | /dline [color] < | ||
+ | |||
+ | This command is used to delete the Nth line from the window. The N2th line can be specified to give a range of line ex: 4-7 will delete line 4,5,6, and 7. | ||
+ | /iline [color] < | ||
+ | |||
+ | This command allows you to add a line of text after a give Nth line. The [color] is the color number for the line. | ||
+ | |||
+ | -n prevents from adding duplicates | ||
+ | -i indents the just added line | ||
+ | /rline [color] < | ||
+ | |||
+ | This command is used to replace the Nth line of a window with another line. The [color] is the color number for the line. | ||
+ | /sline [color] < | ||
+ | |||
+ | This command is used to select the Nth line of window. | ||
+ | |||
+ | -p forces the line of text to be wrapped if it's too long to fit on one line | ||
+ | -h highlights the window' | ||
+ | -a selects a line without clearing the current selections | ||
+ | -s selects the line that was just added and clears the current selections | ||
+ | Customizing a Window | ||
+ | /window -abBcCdeEfg[N]hikl[N]mnoprRsvwxz [-tN,..,N] +bdeflLmnstx < | ||
+ | |||
+ | Yes, this is the same command as we introduced in order to create the window. Don’t be too intimidated by all the new switches | ||
+ | |||
+ | @name - is the name of the dialog | ||
+ | | ||
+ | | ||
+ | / | ||
+ | | ||
+ | | ||
+ | Switched (First Section) | ||
+ | <note important> | ||
+ | -a activate window | ||
+ | -b update horizontal scrollbar width for listbox | ||
+ | -B prevent window from using an internal border | ||
+ | -c close window | ||
+ | -C center window when first created | ||
+ | -d open as desktop window | ||
+ | -D allows a window to be toggled between mdi and desktop | ||
+ | -e single-line editbox | ||
+ | -E multi-line editbox | ||
+ | -f indicates that w h are the required width and height of the text display area as opposed to the window size | ||
+ | -g[N] sets/ | ||
+ | -h hide window (window only appears in Window menu) | ||
+ | -H enables auto-hide for a side-listbox | ||
+ | i dynamically associate with whatever happens to be the active connection | ||
+ | -k[N] hides the @ prefix in the window name, 0 = hide prefix, 1 = show prefix | ||
+ | -l[N] listbox, if N is specified then a side-listbox N characters wide is created | ||
+ | -m allow line marker to be used in window | ||
+ | -n[N] minimize window, 2 = minimize without auto-expanding item in treebar | ||
+ | -o if opened on desktop, place ontop | ||
+ | -p creates a picture window | ||
+ | -r restore window | ||
+ | -R reset window position to previously saved position | ||
+ | -s sort the main window, whether text or listbox | ||
+ | -S sort the side-listbox | ||
+ | -u remove ontop setting of a desktop window | ||
+ | -v close window when associated status window is closed | ||
+ | -w[N] where 0 = hide from switchbar/ | ||
+ | -x maximize window | ||
+ | -z place window button at end of switchbar | ||
+ | |||
+ | |||
+ | |||
+ | -t switches | ||
+ | |||
+ | the t switches is used to set a tab position in a listbox. | ||
+ | |||
+ | -tN,..,N | ||
+ | </ | ||
+ | specifies the tab positions in a listbox, if text contains tabs it will be spaced out according to these tab settings | ||
+ | |||
+ | Switched (Third Section) | ||
+ | <note important> | ||
+ | -b border | ||
+ | -d no border | ||
+ | -e 3d edge | ||
+ | -f dialog frame | ||
+ | -l tool window | ||
+ | -L tool window (will not show up in taskbar) | ||
+ | -n minimize | ||
+ | -s sizeable | ||
+ | -t title bar | ||
+ | -x maximize | ||
+ | |||
+ | |||
+ | Identifiers | ||
+ | $window(N/ | ||
+ | </ | ||
+ | Properties | ||
+ | Property Explanation | ||
+ | x,y,w,h return the left, top positions, and the width and height of the window | ||
+ | dx,dy return the left, top positions of the window | ||
+ | dw,dh return the width and height of the text display area. | ||
+ | bw,bh return the width and height of the bitmap for a graphic window. | ||
+ | mdi Boolean; returns $true if the window is mdi | ||
+ | state returns minimized/ | ||
+ | title returns the text in the titlebar of the window | ||
+ | font returns the name of the current font | ||
+ | fontsize returns the size of the current font | ||
+ | fontbold returns $true if the font is bold, otherwise returns $false | ||
+ | fontcs returns the character set of the current font | ||
+ | logfile returns name of logfile if one is open for the window | ||
+ | stamp returns timestamp setting | ||
+ | icon returns on/off depending on whether icon is visible | ||
+ | ontop returns ontop status for a window | ||
+ | type returns window type | ||
+ | anysc returns $true if the /window -i switch was specified | ||
+ | wid returns the window id | ||
+ | cid returns the associated connection id | ||
+ | sbtext returns the switchbar button text | ||
+ | sbcolor returns the switchbar highlight color | ||
+ | sbstate returns switchbar button state for a window | ||
+ | tbstate returns treebar button state for a window | ||
+ | |||
+ | |||
+ | ==== Custom Window' | ||
+ | |||
+ | |||
+ | There are two ways of making a menu: | ||
+ | |||
+ | * Plain text file (POPUP.TXT) which contains the menu | ||
+ | * Coding the menu in the remote section | ||
+ | |||
+ | |||
+ | |||
+ | The first option i mentioned is using a popup file, this method is very much like a popup in the script editor. | ||
+ | |||
+ | in the following example we will close the window on right click close window: (remember: if you place the code in the popup file, you do not need to put the MENU { } block) | ||
+ | CloseWindow: | ||
+ | |||
+ | The other option i said is using the remote section to code it. In order to tell mIRC in what window to place the menu, we will start the block using the following code: | ||
+ | menu @WindowName { | ||
+ | CloseWindow: | ||
+ | ;mouse ... | ||
+ | ;sclick ... | ||
+ | ;dclick ... | ||
+ | ;uclick .... | ||
+ | ;rclick ... | ||
+ | ;lbclick ... | ||
+ | ;leave ... | ||
+ | ;drop ... | ||
+ | } | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | |||
+ | This example will demonstrate how to use a custom window. All this example does is write everything everyone says in that windows. | ||
+ | ON *:TEXT:*:#: { | ||
+ | | ||
+ | aline @EveryThing $chr(3) $+ 5[ $+ $chr(3) $+ 2 $+ $chan $+ $chr(3) $+ 5] $chr(3) $+ 5< $+ $chr(3) $+ 10 $+ $nick($chan, | ||
+ | | ||
+ | } | ||
+ | Menu @EveryThing { | ||
+ | Close Window: { window -c $active } | ||
+ | } | ||
+ | |||