AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Paste email

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Bob
Guest





PostPosted: Thu Aug 19, 2004 7:37 pm    Post subject: Paste email Reply with quote

I need to input my e-mail address into like hundreds of documents per day sometimes... various documents .doc .txt .xml web...
Any ideas ?
Something that holds my email then hit a key and pates .
Back to top
scouchman



Joined: 28 Apr 2004
Posts: 44

PostPosted: Thu Aug 19, 2004 7:50 pm    Post subject: Reply with quote

I'm not good on hotstrings, but I know you can do it that way, otherwise as a hotkey:

Code:

#e::  ; hit Window-e to execute script
Send, email@company.com
Return


If you need an enter after it add {ENTER} to the end of the Send line.

I like using the Window key for my scripts, but you can use almost anything. a good single key that isn't used for much would be the PrintScreen, and if you put a ~ in front, it will still pass the "PrintScreen" for those apps that do use it.

Code:

~PrintScreen:: ; hit PrintScreen to execute script
Send, email@company.com{ENTER}
Return


Thanks Chris for the comment below about returns. Edited the above so they should be correct now -Scott
_________________
Scott F Couchman


Last edited by scouchman on Thu Aug 19, 2004 8:55 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Aug 19, 2004 8:38 pm    Post subject: Reply with quote

And don't forget to add a return at the end of each of those examples; otherwise, each subroutine will continue on to execute whatever comes after it.
Back to top
View user's profile Send private message Send e-mail
Bob
Guest





PostPosted: Thu Aug 19, 2004 8:45 pm    Post subject: Reply with quote

what do you mean by return ?
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Aug 19, 2004 8:51 pm    Post subject: Reply with quote

A return is needed to finish any subroutine that isn't a single-line.

Single line examples:

::me@::jsmith@somedomain.com ; Auto-replace me@ with an e-mail address as you type.

#z::Send, jsmith@somedomain.com ; Win-Z, a single-line hotkey.

But these are multi-line and thus each requires a return at the end:
#z::
WinActivate, SomeWindow
Send, jsmith@somedomain.com
return

::me@::
MsgBox You typed me@
return
Back to top
View user's profile Send private message Send e-mail
Bob
Guest





PostPosted: Thu Aug 19, 2004 8:54 pm    Post subject: Reply with quote

Ok thanks for the info .
Back to top
Bob
Guest





PostPosted: Thu Aug 19, 2004 9:02 pm    Post subject: Reply with quote

It's funny this one I did and had to add an extra letter in the front to work ?
#z::Send, jjsmith@somedomain.com ; Win-Z, a single-line hotkey.
Or it would leave off the first letter .
Back to top
Bob
Guest





PostPosted: Thu Aug 19, 2004 9:26 pm    Post subject: Reply with quote

Have a few friends that want to use this how would you have a input box so they could us their own email address with out me hard coding it in ?
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Aug 19, 2004 10:02 pm    Post subject: Reply with quote

Quote:
had to add an extra letter in the front to work...or it would leave off the first letter.

Some apps are sensitive to how fast keystrokes occur. You could try making it go slower:
#z::
SetKeyDelay 20
Send, jsmith@somedomain.com ; Win-Z, a single-line hotkey.
return

I haven't tested this lately on Windows 9x. Ctrl/Alt/Shift/Win hotkeys that use the Send command are a little less reliable on there.

Quote:
how would you have a input box so they could us their own email address with out me hard coding it in?

InputBox, OutputVar, Enter your e-mail address.
MsgBox You entered %OutputVar%.

But often the best way is to have a section at the top of the script that is easy for others to modify:

email_address = put_your_address@here.com
return ; End of auto-execute section

#z::Send %email_address%

You can also read and write to INI files to store info between sessions. This is done with IniRead and IniWrite.
Back to top
View user's profile Send private message Send e-mail
Bob
Guest





PostPosted: Thu Aug 19, 2004 10:16 pm    Post subject: Reply with quote

Thanks Chris for all the help . I have this and it works but it is still leaving off the first letter to the emal address ?
Quote:
SetKeyDelay 90
InputBox, OutputVar, Enter your e-mail address.
MsgBox You entered %OutputVar%.
!z::Send,%OutputVar%
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Aug 19, 2004 10:24 pm    Post subject: Reply with quote

I see the problem now. Since you're using an Alt hotkey, you run into the issue described in the FAQ. The following is the workaround:

!z::Send,{AltUp}{Alt}%OutputVar%
Back to top
View user's profile Send private message Send e-mail
Bob
Guest





PostPosted: Thu Aug 19, 2004 10:27 pm    Post subject: Reply with quote

Thanks Chris that did the trick ..
Back to top
Candle



Joined: 19 Aug 2004
Posts: 334

PostPosted: Thu Aug 19, 2004 10:58 pm    Post subject: Reply with quote

I join Cool
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5026
Location: imaginationland

PostPosted: Fri Aug 20, 2004 1:47 am    Post subject: My Script... Reply with quote

I think you should find this useful:

Code:
#SingleInstance force
InputBox, msg, Enter E-Mail, Please type in your email address:, , 350, 125
if ErrorLevel <> 0
ExitApp,
else
MsgBox, 64, Ready, Press CTRL+S to send your email (%msg%) or Escape to quit.
^s::Send, %msg%
Esc::ExitApp
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group