mIRC Scripting
mIRC: Picture Window
The picture window is a special type of custom window which combines text and graphics. The picture window can trigger events related to mouse movement and event. The Picture Window loads just like the normal window using:
The -p Switch indicates it’s a picture window.
Drawing In The Window
Clear
This command clears the whole picture window:
-n prevents the display from being updated immediately
Dot
The following command allow you to draw a dot using the specified color and size at the (x,y) co-ordinates. Multiple co-ordinates can be provided:
-i draws in inverse mode
-h highlights the windows icon if it's minimized
-n prevents the display from being updated immediately
-r indicates that the color is in RGB format: $rgb(N,N,N)
This example of a SmileyFace moving the eyes
To Start It:
/TimerSmiley -m 0 500 /Smiley
To Stop It:
/TimerSmiley OFF
window -p @SmileyFace
clear @SmileyFace
drawdot @SmileyFace 1 100 250 250
drawdot @SmileyFace 8 95 250 250
drawdot @SmileyFace 1 70 250 270
drawdot @SmileyFace 8 70 250 260
drawdot @SmileyFace 1 20 $r(200,210) $r(230,250)
drawdot @SmileyFace 1 20 $r(295,305) $r(230,250)
}
Line
This command is used to draw a line between two points. Additional points can be specified to continue the line.
Rectangle
This is the same as the draw line just for rectangles. Additional coordinates can be used for multiple rectangles.
-e This switch can be used to change the shape from a rectangle to an elipse
-d switch can be used to give the rectangle rounded corners.
Fill Area
This command is used to fill a specific area with a given color.
-s is used if you want to specify a second filling color to be used.
Text
This command is used to draw text at given coordinates.
-p is helpful when you want to convert IRC colors to real colors.
-b is used when you specify a background color as the second parm.
Saving
The drawsave command is used to save the picture drawn in a custom window to a BMP picture file.
-bN is used to specify the bit depth (1,4, 8, 16, 24, or 32)
-qN Lets you specify the quality of the JPEG file. (1-100)
Copy Segment
This is used to copy a segment or a picture from specific coordinates to another part or another picture window.
Draw A Picture
This command is used to load and draw a picture at a specific coordinate.
/drawpic -ihmnotsclgN @ [color] <x y [w h]> [x y w h] [N] <filename>
Rotate
The following command is used to rotate and area of the picture by an angle.
-h highlights the windows icon if it's minimized
-n prevents the display from being updated immediately
-b it sets the background color
-f fits the newly rotated bitmap into the original
-c centers the rotated image if -f isn't specified
Replace Colors
This command is simply used to replace colorA in a bitmap picture with ColorB.
-n prevents the display from being updated immediately
-r indicates that the color is in RGB format: $rgb(N,N,N)

