PicWin picture viewer
Small picwin script that browse after a photo and open it in mirc. When opened, you have a single menu option to close it. This mirc snippet is for educational purposes, you can implement whatever you want and to do with the code.
alias pic {
var %file
$iif( !$1,%file = $sfile(C:,Choose a photo to open :),%file = $1- )
if (%file) {
var %a $pic(%file).width $pic(%file).height
$iif( $window(@PictureViewer),window -c @PictureViewer,window -haCipdo +d @PictureViewer -1 -1 %a )
drawpic @PictureViewer 0 0 $shortfn(%file)
}
}
menu @PictureViewer {
CLose:/window -c @PictureViewer
}