1
votes

I'm looking for a AutoHotKey script the will copy a highlighted email attachment link into Windows Run Diag (Windows Key+R) and open the email. So far I have parts of what I want to work, but can't seem to get it all into one script to give the desired result.

These are my requirements and what I have so far to better understand my end goal:

Requirements:

1) Highlighted email attachment link from a browser

2) Ctrl+C -- to copy the email attachment link from a browser

3) Windows Key+R -- to open the Windows Run Diag

4) Ctrl+V -- Paste the email attachment link into the Windows Run Diag

5) Enter -- to open the email

AutoHotKey Script:

$F10::    
Send, ^c  ; This command alone copy the email attachment link     
ClipWait     
FileDlg := ComObjCreate("Shell.Application").FileRun, FileDlg := "" ; this command alone also open the Windows Run Diag    
Send, ^c{ENTER}    
return
1
If you do it manually (without using AutoHotKey), does Outlook open correctly with the "email attachment link"?Gino Mempin
Your code seems to send a copy command to your run dialog, instead of a paste. Change the Send, ^c to Send, ^vJackStoneS

1 Answers

0
votes

Have you tried adding a delay after opening the Run dialog? Also you could replace the comobjcreate with #r if you didn't have it disabled.

$F10::
Send, ^c
ClipWait
Send, #r
Sleep 100
Send, ^v{ENTER}
return