| View previous topic :: View next topic |
| Author |
Message |
Bob Guest
|
Posted: Thu Aug 19, 2004 7:37 pm Post subject: Paste email |
|
|
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
|
Posted: Thu Aug 19, 2004 7:50 pm Post subject: |
|
|
I'm not good on hotstrings, but I know you can do it that way, otherwise as a hotkey:
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Aug 19, 2004 8:38 pm Post subject: |
|
|
| 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 |
|
 |
Bob Guest
|
Posted: Thu Aug 19, 2004 8:45 pm Post subject: |
|
|
| what do you mean by return ? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Aug 19, 2004 8:51 pm Post subject: |
|
|
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 |
|
 |
Bob Guest
|
Posted: Thu Aug 19, 2004 8:54 pm Post subject: |
|
|
| Ok thanks for the info . |
|
| Back to top |
|
 |
Bob Guest
|
Posted: Thu Aug 19, 2004 9:02 pm Post subject: |
|
|
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
|
Posted: Thu Aug 19, 2004 9:26 pm Post subject: |
|
|
| 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
|
Posted: Thu Aug 19, 2004 10:02 pm Post subject: |
|
|
| 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 |
|
 |
Bob Guest
|
Posted: Thu Aug 19, 2004 10:16 pm Post subject: |
|
|
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
|
Posted: Thu Aug 19, 2004 10:24 pm Post subject: |
|
|
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 |
|
 |
Bob Guest
|
Posted: Thu Aug 19, 2004 10:27 pm Post subject: |
|
|
| Thanks Chris that did the trick .. |
|
| Back to top |
|
 |
Candle
Joined: 19 Aug 2004 Posts: 334
|
Posted: Thu Aug 19, 2004 10:58 pm Post subject: |
|
|
I join  |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5026 Location: imaginationland
|
Posted: Fri Aug 20, 2004 1:47 am Post subject: My Script... |
|
|
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 |
|
 |
|