I am not familiar with Windows, but since you asked for solutions for all OSes, I have an applescript solution for Mac OS X that I have tested by copying a picture on this website and executing the script.
This applescript assumes the image is on the clipboard in TIFF format (might have to test to see if this is what comes out of Excel.) It creates the file from the clipboard, saves it to a temporary directory, then pastes the path into a specified field on the frontmost page in Safari.
So, you would copy the image, switch to your safari page, and run the script. (From the script menu, make it into a service and assign a shortcut, or use FastScripts to assign a shortcut to the applescript.)
The script will have to be adjusted to find the proper field on your form.
repeat with i in clipboard info
if TIFF picture is in i then
-- grab the picture from the clipboard, set up a filename based on date
set tp to the clipboard as TIFF picture
set dt to current date
set dtstr to (time of dt as string) & ".tiff"
set pt to ((path to temporary items from user domain as string) & dtstr)
set tf to open for access file pt with write permission
-- save the file
try
write tp to tf
close access tf
on error
close access tf
end try
-- put the path into the proper field in the web Browser
tell application "Safari"
activate
-- adjust javascript as necessary
-- currently inserts into Answer textarea of this superuser.com page for testing
-- ie. make sure you've clicked "add answer" first
set myJS to "document.getElementById('wmd-input').value = '" & pt & "'"
-- document 1 is frontmost
do JavaScript myJS in document 1
end tell
exit repeat
end if
end repeat
Edit: Things to consider:
- I do nothing with the path, default delimiter is a colon. You may want the POSIX path.
- Is it possible to change the javascript to execute a file upload javascript? (I have no experience with this, but I think it could be done.)
- Excel supports applescript, and has a
copy picture
command. It may be feasible to do this in one step. Select picture, run script, script copies, saves, opens web page and fills out the form.
I think its not possible without third party softwares. – ukanth – 2010-05-03T10:24:24.597
Third party software is not a problem - I would just like to know if such software exists. – Alexander Torstling – 2010-05-03T10:54:34.647
If nobody finds such, I will make one.. Windows solution would be enough for me. – Pavel Radzivilovsky – 2010-06-28T10:04:04.750
1Sounds like something autohotkey could do, though I'd have to look into how. Sounds like a great idea, though. – Phoshi – 2010-06-28T10:16:06.967