hi, a friend of mine created a really cool "imageshack"-like button. you can upload an selected image to an ftp-server with just one click.
i tried to optimize the function a little bit, becaus in his button, you have to stay in the left lister as source.
for example, the original function of my mate:
@admin
@set format = {dlgchoose|Format|GIF=gif+JPG=jpg+PNG=png+BMP=bmp}
@set quality = {dlgchoose|Qualität|niedrig=30+mittel=60+hoch=80+original=100}
@set file = {dlgstringS|Name|screen}
Image CONVERT={$format} QUALITY={$quality} AS tempimage HERE
Go FTPSITE=monopix OPENINRIGHT
Copy tempimage.{$format} MOVE AS {$file}.{$format}
Clipboard SET http://www.monotonique.de/pix/{$file}.{$format}
you get some option fields for image format, quality and filename. then the function connects to the ftpserver and moves the image.
my optimized function:
@admin
@set format = {dlgchoose|Format|GIF=gif+JPG=jpg+PNG=png+BMP=bmp}
@set quality = {dlgchoose|Qualität|niedrig=30+mittel=60+hoch=80+original=100}
@set file = {dlgstringS|Name|screen}
Go CURRENT OPENINLEFT NEWTAB
Set FOCUS=Left
Image CONVERT={$format} QUALITY={$quality} AS tempimage HERE
Go FTPSITE=images.0workx.de OPENINRIGHT NEWTAB
Copy tempimage.{$format} MOVE AS {$file}.{$format}
Clipboard SET http://images.0workx.de/view/{$file}.{$format}
its working untill the image conversion, but it will not upload the image onto the ftp server. it opens up a new tab, but nothing else will happen.
the weird thing is, i used it in an other function, where i can upload images directly from the clipboard to an ftp server (like this):
@admin
@set format = {dlgchoose|Format|GIF=gif+JPG=jpg+PNG=png+BMP=bmp}
@set quality = {dlgchoose|Qualität|niedrig=30+mittel=60+hoch=80+original=100}
@set file = {dlgstringS|Name|screen}
Set FOCUS=Left
GO PATH G:\_converted-tmp OPENINLEFT NEWTAB
Clipboard PASTE
Select NONE
Select Zwischenablagebild.bmp
Image CONVERT={$format} QUALITY={$quality} AS Zwischenablagebild HERE
Go FTPSITE=images.0workx.de OPENINRIGHT NEWTAB
Copy Zwischenablagebild.{$format} MOVE AS {$file}.{$format}
Clipboard SET http://images.0workx.de/view/{$file}.{$format}
Delete Zwischenablagebild.bmp QUIET
Go TABCLOSE
and this is working very well. thats the reason why i am a little bit confused.
would be nice if you can find out, why my upload function is not working.
tia
volker