mIRC Home    About    Download    Register    News    Help

Print Thread
#156217 13/08/06 06:07 PM
Joined: Aug 2006
Posts: 1
C
Mostly harmless
OP Offline
Mostly harmless
C
Joined: Aug 2006
Posts: 1
Why don't mIRC have allow uploading/viewing of photos? Im amazed that it hasn't been done already and no one thought of it

#156218 13/08/06 06:34 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on *:filercvd:*.bmp,*.jpg,*.gif,*.ico:$iif(!$lock(run),$filename,echo 4 -a Run option locked.  Can not proceed with $filename) 

Requires version 6.17 or higher

#156219 13/08/06 07:47 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Quote:
Code:
 on *:filercvd:*.bmp,*.jpg,*.gif,*.ico:$iif(!$lock(run),[color:red] run [/color]$filename,echo 4 -a Run option locked.  Can not proceed with $filename) 

Requires version 6.17 or higher


You can also use the ICON feature of an mIRC dialog to display a picture, and it will adjust the size to keep the height/width ratio correct. Using window -p @name is more difficult, since it will stretch the picture to fit the window.

#156220 13/08/06 08:24 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
oops...nice catch on the missing run command from my code.
While the icon feature can be used, as you stated, I think the icon has to be specified in the dialog layout, so you'd have to edit the dialog code each and every time you wanted to view a different picture.

#156221 13/08/06 08:50 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
This is extremely barebones, you can add stuff to scroll through the receiving history, show the nick and filename, add close button, etc. Open the dialog window with:

/dialog -ma showpic showpic

Put in remotes script:

on *:filercvd:*.bmp,*.jpg,*.gif,*.ico:{ if ($dialog(showpic)) did -g showpic 123 " $+ $filename $+ " }
dialog showpic {
option dbu
title "file received"
size -1 -1 400 320
icon 123,1 1 390 310
}


Link Copied to Clipboard