General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
send image
Posted by: disrupted
Date: December 02, 2008 12:53PM

inserts image in message body:
http://necb.bizhat.com/kmeleon/picmailer.7z
requires outlook express to be default email client. unfortunately, unlike other clients; oe does not support -attach and -attachment parameters so the script functions in a somewhat baroque method but it works smoothly and fast.

script source:
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: yanni
; Script Func: Automates inserting images from k-meleon to outlook express
;
#NoTrayIcon
#automation
$sAttach = $CmdLineRaw

ShellExecute("mailtomoody smileysubject=Emailing:Image&body=Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments. Check your e-mail security settings to determine how attachments are handled.")
sleep(80);
WinWaitActive("New Message")
sleep(300);
Send("{TAB}") ;
sleep(60);
Send("{TAB}") ;
sleep(60);
Send("{TAB}") ;
sleep(60);
Send("{TAB}") ;
Send("!i") ;
sleep(40);
Send("p") ;
sleep(40);
send($sAttach);
sleep(40);
Send("{ENTER}");


snapshots:




UPDATE: macro and script update(download from same link)
1-message subject=ImageURL instead of 'emailing:image
2-pasting ImageURL instead of 'typing' (works very fast, insertbox hardly visible)

updated src:
#NoTrayIcon
#automation

ShellExecute("mailtomoody smileysubject=&body=Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments. Check your e-mail security settings to determine how attachments are handled.")
sleep(80);
WinWaitActive("New Message")
sleep(300);
Send("{TAB}") ;
sleep(40);
Send("{TAB}") ;
sleep(40);
Send("{TAB}") ;
send("^v");
sleep(40);
Send("{TAB}") ;
Send("!i") ;
sleep(40);
Send("p") ;
sleep(40);
send("^v");
sleep(40);
Send("{ENTER}");


UPDATE2: super fast+ preserving 'Emailing:' before ImageURL in subjectline
#NoTrayIcon
#automation
$sAttach = $CmdLineRaw

ShellExecute("mailtomoody smileysubject=Emailing: &body=Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments. Check your e-mail security settings to determine how attachments are handled.")

WinWaitActive("New Message")
sleep(30);
Send("{TAB 3}") ;
Send("{RIGHT 10}")
send("^v");
sleep(10);
Send("{TAB}") ;
Send("!i") ;
sleep(10);
Send("p") ;
sleep(10);
send("^v");
Send("{ENTER}");




Edited 2 time(s). Last edit at 12/02/2008 03:06PM by disrupted.

Options: ReplyQuote
Re: send image
Posted by: JamesD
Date: December 07, 2008 09:50PM

@ disrupted

Got this loaded and like it a lot. Thanks for your work.

One question about picmailer.kmm. I see errors in the error console, but if they are corrected then app does not work. I am talking about the two lines at 14 and 15. Can't put semi-colons there. Are they supposed to be one line with 16?

Options: ReplyQuote
Re: send image
Posted by: disrupted
Date: December 08, 2008 02:37AM

thank you james; you're rigth, there should be semi-colons at end of those lines. kinda wrote the macro in a rush.. i added the semi-colon and it works fine and the messages were gone from the error console

here's the correct macro:
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
#
# ---------- image emailer
#
# Dependencies : - terry's chocolate orange(optional), outlook express
# Resources : -
# Preferences : -
# --------------------------------------------------------------------------------

$_tool_path=getfolder(RootFolder)."\\Tools";

picmailer{
setclipboard("");
id(ID_COPY_IMAGE_LOCATION);
exec($_tool_path."\\picmailer.exe ");
}
picmailer_BuildMenu{
# imagesave
setmenu(ImageSave,macro,"Send Image...",picmailer,3);
}

# ------------------------------------------------------------------------------------------------------------------
$OnInit=$OnInit."picmailer_BuildMenu;";
$macroModules=$macroModules."picmailer;"


also, ImageURL is no longer needed for the script as it gets the url from the clipboard and doesn't require passing command parameter from the macro anymoe. i've uploaded the new macro to picmailer.7z

Options: ReplyQuote
Re: send image
Posted by: desga2
Date: December 08, 2008 09:27AM

Only one note:

If you like use clipboard you must conserve the old contain in clipboard.
But this can complicate your code tool. At least you must indicate that this macro delete the previus contain in clipboard.

For example:
picmailer{
$_cliptemp=getclipboard();
setclipboard("");
id(ID_COPY_IMAGE_LOCATION);
exec($_tool_path."\\picmailer.exe ");
setclipboard($_cliptemp);
}

Also for privacy I don't let the image in clipboard:
picmailer{
setclipboard("");
id(ID_COPY_IMAGE_LOCATION);
exec($_tool_path."\\picmailer.exe ");
setclipboard("");
}

But all this would be too demanding.
Good work! smiling smiley

K-Meleon in Spanish

Options: ReplyQuote
Re: send image
Posted by: JamesD
Date: December 13, 2008 01:58AM

@ disrupted

I finally got down my "to do list" to install the revised picmailer.kmm. Now I have no errors in the console.

Thanks very much for this work. I am now using it quite a bit.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.