General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
macro language stuff, js, dos, etc
Posted by: siria
Date: February 02, 2010 02:54PM

Can't figure this out, absolutely no way:

When clicking File/Image/Link > Save as, there appears a suggested name and the filetype, which may be different from the URL (like the "sourceforge"-logo on the left side here: sflogo.sourceforge.net/sflogo.php?group_id=14285&type=1).

How can I figure out that name+type for a macro variable??

Or how to get a given variable into the suggested save-name field?
Or better, how to save a page/image/link to disk and reopen from there with another program, all in one macro/menu entry?
Suppose that may require some javascript, but have ZERO clue of that, and those scripts look all horribly complicated to me, even the smallest snippets :-/

Perhaps anyone know...? *hoping*



Edited 2 time(s). Last edit at 04/02/2010 10:42AM by siria.

Options: ReplyQuote
Re: Need macro help...
Posted by: JujuLand
Date: February 02, 2010 05:39PM

For me, even the extension is not ok, it gives me sflogo.php, but the type given is the right type : PNG image (*.png)

You have just to correct the extension, and it works ...

Edit :
hum, it seems I haven't understood all what you where asking for.

A little bit complicated ...

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc





Edited 1 time(s). Last edit at 02/02/2010 05:42PM by JujuLand.

Options: ReplyQuote
Re: Need macro help...
Posted by: JamesD
Date: February 03, 2010 02:15PM

Quote
siria
When clicking File/Image/Link >

I don't understand. I do not have a "Image" item under the "File" menu.

Options: ReplyQuote
Re: Need macro help...
Posted by: disrupted
Date: February 03, 2010 02:52PM

the image format>get file extension is parsed through the gecko engine not through the macro language

Options: ReplyQuote
Re: macro language stuff, js, dos, etc
Posted by: siria
Date: February 08, 2010 11:58AM

Found something with javascript on the web, but not the slightest idea about the syntax to get it into a macro variable, and/or how to change the save-name:

Quote

Structure for holding info about a URL and the target filename it should be saved to. This structure is populated by initFileInfo(...).
@param aSuggestedFileName This is used by initFileInfo(...) when it cannot 'discover' the filename from the url
@param aFileName The target filename
@param aFileExt The extension of the filename

function FileInfo(aSuggestedFileName, aFileName, aFileBaseName, aFileExt, aUri) {
this.suggestedFileName = aSuggestedFileName;
this.fileName = aFileName;
this.fileExt = aFileExt;}



Edited 1 time(s). Last edit at 04/02/2010 11:53AM by siria.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.