 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
TotalBalance
Joined: 22 Jan 2007 Posts: 180 Location: CO, USA
|
Posted: Fri Jul 18, 2008 7:31 pm Post subject: Recall signature image to paste into GMail |
|
|
I've finally figured out how to paste my handwritten signature image into GMail (not as easy as one might think).
After scanning & saving my signature to file (jpg/png),
1) I ftp the image to one of my websites /images directories (you could also use Flickr, etc - the key is to have a URL to point to the image).
2) I open my html editor (NVU), create a web page and insert the image URL.
3) I copy the image from within my html editor.
4) I can then paste the signature image into the body of my GMail msg.
Don't know why I have to copy from within the html editor to make this work (if I try to copy the image from the browser or file folder, etc. it doesn't work).
So my question is how can I automate this process. In other words, after copying the image from within my html editor, save it to clipboard permanently so I can easily recall and paste to GMail emails?
I've looked at a number of Clipboard threads on this forum but can't seem to find one that will save images for future recall.
1) Save images from clipboard:
http://www.autohotkey.com/forum/topic7792.html
2) Delux Clipboard:
http://www.autohotkey.com/forum/topic2665.html&highlight=clipboard+image
3) Binary file reading and writing (error msg. when running test ahk)
http://www.autohotkey.com/forum/topic7549.html&highlight=clipboard+image
4) copy a (jpeg) file to the clipboard
http://www.autohotkey.com/forum/topic832.html&highlight=clipboard+image
Any ideas?
Thanks in advance, _________________ Lars |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jul 18, 2008 11:19 pm Post subject: Re: Recall signature image to paste into GMail |
|
|
| TotalBalance wrote: | | Don't know why I have to copy from within the html editor to make this work... |
...at 1st during my testing I thought you were doing too many steps, but upon pasting into Yahoo Mail (don't have GMail yet, unfortunately)...I noticed the issue, nothing pasted...(worked in Open Office, many ways)...but you can cut down some steps...
- Upload the image to a permanent online sig location (there is another work-around I don't wanna go into right now)
- Open that location in Firefox
- Press Ctrl+A, Ctrl+C...& with my script running...press Win+Shift+S
- Go to GMail & press Win+S
...my script...
...for other people testing, select & copy this...
...then try to paste into GMail... |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Sat Jul 19, 2008 12:04 am Post subject: |
|
|
once you know what the stuff to paste is, you can hardcode it into a hotkey or hotstring.
Paste the thing you want into the ###### of this script and save it, then run the script and type [sig] to paste the right thing
| Code: |
::[sig]::
ClipSaver := ClipboardAll
Clipboard = ######
Sleep, 25
Send, ^v
Clipboard := ClipSaver
Return
|
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 1033
|
Posted: Sat Jul 19, 2008 12:19 am Post subject: |
|
|
why not not use the copy paste in the first place
just use an injectjs to put an image tag or some html? _________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
TotalBalance
Joined: 22 Jan 2007 Posts: 180 Location: CO, USA
|
Posted: Sat Jul 19, 2008 10:08 am Post subject: |
|
|
Guest:
Thanks for the "Paste Sig" script. Works great!
One change I made was to comment out both ;cba= lines. Now, I just run your script once to save the sig. image from Firefox (CTL-A, CTL-C, Win+Shift+S) to sig.cba. Even after a PC reboot, as long as the script is running, I just Win+S, in GMail, and the sig. image pastes correctly. For whatever reason, if I don't comment out the lines, after a reboot, all that's pasted is the file path, not the image. Not being a great programmer, perhaps you can explain why?
For my purposes, I'll just do one more mod that splits out the two subroutines so, after creating the sig.cba file with the SaveSig: routine, I just run the PastSig: routine from a launcher script anytime I need my sig. pasted into GMail. Make sense or is there a better way to automate?
engunneer:
I tried your script but am not clear how I "Paste the thing you want into the ###### of this script and save it". When I tried to paste the image from clipboard, nothing appears (of course I've got the script open in Notepad++ so I may have misunderstood just how to do this). If I paste in the link to the image file, when typing in [sig] it just returns the link path, not the image. What am I missing?
tank:
Sorry, don't understand what your suggesting. Could you give an example? _________________ Lars |
|
| Back to top |
|
 |
TotalBalance
Joined: 22 Jan 2007 Posts: 180 Location: CO, USA
|
Posted: Sat Jul 19, 2008 11:44 am Post subject: |
|
|
I guess I don't really need to break it out, but since I did, here the routines broken out with minor changes.
The "SaveSigFile.ahk" only needs to be used when you want to save for the first time or wish to change your saved handwritten signature.
| Code: |
#SingleInstance force
;//******************* Settings *******************
SigFile=%A_ScriptDir%\sig.cba
;//******************* /Settings *******************
;//******************* Hotkeys *******************
;//Save clipboard as .cba
;//Win+Shift+S
#+s::Gosub, SaveSig
;//******************* /Hotkeys *******************
;//******************* Subroutines *******************
;//******************* SaveSig *******************
SaveSig:
cba:=ClipboardAll
if (cba="") {
msgbox, 64, , Copy the signature to the clipboard...
return
}
IfExist, %SigFile%
{
msgbox, 36, ,
(LTrim
Sig file exists...overwrite?
%SigFile%
)
IfMsgBox, Yes
writefile=1
} else writefile=1
if (writefile) {
FileAppend, %cba%, %SigFile%
msgbox, 64, ,
(LTrim
Sig saved!
)
}
;cba=
writefile=
ExitApp
;//******************* /SaveSig *******************
;//******************* /Subroutines *******************
|
When launched, the "PasteSigFile.ahk" runs in background. When ready to paste your signature, hit Win+S.
| Code: |
#SingleInstance force
;//******************* Settings *******************
SigFile=%A_ScriptDir%\sig.cba
;//******************* /Settings *******************
;//******************* Hotkeys *******************
;//Paste saved .cba
;//Win+S
#s::Gosub, PasteSig
;//******************* /Hotkeys *******************
;//******************* Subroutines *******************
;//******************* PasteSig *******************
PasteSig:
;//FileRead, cba, *c %SigFile%
cba:=clipboard
FileRead, clipboard, *c %SigFile%
Send, ^v
Sleep, 119
clipboard:=cba
return
;//******************* /PasteSig *******************
;//******************* /Subroutines *******************
|
By all means, let me know how this might be improved on. Thx! _________________ Lars
Last edited by TotalBalance on Sat Jul 19, 2008 12:07 pm; edited 1 time in total |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Sat Jul 19, 2008 11:55 am Post subject: |
|
|
| TotalBalance wrote: |
By all means, let me know how this might be improved on. Thx! |
You need to change JSLover's links to point to the actual autohotkey.net link instead of his 'tracking' link.....Which BTW is in violation of the guidelines for using autohotkey.net... Personally I think his ahk.net account should be revoked. _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
TotalBalance
Joined: 22 Jan 2007 Posts: 180 Location: CO, USA
|
Posted: Sat Jul 19, 2008 12:06 pm Post subject: |
|
|
I don't have any issue removing them, I didn't even know what significance they had as they appeared to be commented out.
Learn something new every day on this forum
[Done - wasn't sure what link to point to so just remove] _________________ Lars |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Jul 19, 2008 6:19 pm Post subject: |
|
|
| engunneer wrote: | | Paste the thing you want into the ###### |
...that will not work as the ### needs to be in a special clipboard format, like RTF or text/html or something...
| tank wrote: | | just use an injectjs to put an image tag or some html? |
...if you are referring to IE7...NO!...Firefox is the 1 & only browser!...
| TotalBalance wrote: | One change I made was to comment out both ;cba= lines.
...
For whatever reason, if I don't comment out the lines, after a reboot, all that's pasted is the file path, not the image. Not being a great programmer, perhaps you can explain why? |
...are you saying only after a reboot? I tested my script, but I did not try rebooting...also did you remove both cba= lines at the same time?...or test 1 at a time?...they are only for clearing AutoHotkey memory so if you have a large sig it's not in memory all the time...it really shouldn't affect pasting, but I'll try to do testing...(if you can provide exact steps, including reboot if necessary)...
| ahklerner wrote: | | You need to change JSLover's links to point to the actual autohotkey.net link instead of his 'tracking' link |
...it's a Permalink...I don't wanna change all the links on the forum if something changes in the future...not all my r.secsrv.net links end up at AutoHotkey.net...it's my redirect server...I link there & I can redirect anywhere I need to...YES...I have access logs & I like to know when someone clicks BUT autohotkey.com & autohotkey.net & every other damn website has access logs...
| ahklerner wrote: | | Which BTW is in violation of the guidelines for using autohotkey.net... Personally I think his ahk.net account should be revoked. |
...o-m-g...sheesh!...I try to post links that WONT break in the future & get repaid like this...whatever, ahklerner I never had a problem with you before, but NOW I DO...just know if you post any issue I can fix, I won't help you...
| TotalBalance wrote: | | ...I didn't even know what significance they had as they appeared to be commented out. |
...I always link to my Base.ahi at the top of my scripts in case I change the script to actually use something in Base.ahi...but yes it was commented out, so it wasn't used in this script, yet...
| TotalBalance wrote: | | [Done - wasn't sure what link to point to so just remove] |
...well for this script you don't need Base.ahi, but in the future if you did, would you want to just #Include Base.ahi & not include the url for where people can find it?...also "changing" my url to the "non-tracking link" doesn't help, cuz where I redirect Base.ahi to right now (7-19-08) may not be the same in the future...so providing a Permalink (permanent link) is a service, not a "bad thing"... |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 1033
|
Posted: Sat Jul 19, 2008 7:38 pm Post subject: |
|
|
| Anonymous wrote: |
| tank wrote: | | just use an injectjs to put an image tag or some html? |
...if you are referring to IE7...NO!...Firefox is the 1 & only browser!...
|
niave little man
there are doesns of ways to pushy js to a page not just with my com scripts but others as well
i say inject refering to its clasic veriosn
| Code: | javascript:void(somejs)
|
pushed thru the edit 1 control
yes i think more of ie than firefox but that doesnt mean im blind thanks _________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Sat Jul 19, 2008 10:40 pm Post subject: |
|
|
| Anonymous wrote: |
| ahklerner wrote: | | You need to change JSLover's links to point to the actual autohotkey.net link instead of his 'tracking' link |
...it's a Permalink...I don't wanna change all the links on the forum if something changes in the future...not all my r.secsrv.net links end up at AutoHotkey.net...it's my redirect server...I link there & I can redirect anywhere I need to...YES...I have access logs & I like to know when someone clicks BUT autohotkey.com & autohotkey.net & every other damn website has access logs...
| ahklerner wrote: | | Which BTW is in violation of the guidelines for using autohotkey.net... Personally I think his ahk.net account should be revoked. |
...o-m-g...sheesh!...I try to post links that WONT break in the future & get repaid like this...whatever, ahklerner I never had a problem with you before, but NOW I DO...just know if you post any issue I can fix, I won't help you...
|
I have never or never will ask for your help.how can a link to autohotkey.net break unless YOU are too **** stupid to make the link correctly????
seriously....i really hope you do get banned from ahk.net. you are doing something that is in complete violation of the rules and have just ADMITTED that you are tracking people that are clicking on your links...... TITAN I hope you read this. _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|