Windows XP 또는 Windows 7에서 "메일 수신자에게 보내기"를 편집하는 방법

Windows XP 또는 Windows 7에서 "메일 수신자에게 보내기"를 편집하는 방법

제가 사용하고 있는 클라이언트는 Windows Live Mail입니다. 요망되는 결과:

  1. 사용자는 파일을 마우스 오른쪽 버튼으로 클릭하고 "보내기->메일 수신자"(또는 다른 사용자 정의 생성 바로가기)를 선택합니다.

  2. Windows Live Mail 새 메시지 창이 나타나고 다음 내용이 포함됩니다.

    받는 사람: 특정 이메일 주소
    제목: (비어 있음)
    본문: (비어 있음)
    클릭한 파일이 첨부되었습니다.

내가 얻은 가장 가까운 것은 다음과 같은 대상을 사용하여 Send To 폴더에 바로 가기를 만드는 것입니다 .C:\Program Files\Windows Live\Mail\wlmail.exe" /mailurl:mailto:[email protected]

결과적으로 Windows Live Mail 새 메시지 창이 팝업되고 다음 내용이 포함됩니다.

에게:[이메일 보호됨]"C:\somefile.txt"
제목: (비어 있음)
본문: (비어 있음)

빼고는 거의 맞음선택한 파일이 첨부되지 않았습니다! 받는 사람: 필드에만 언급되어 있습니다.필드를 자동 으로 채우면서 첨부하려면 어떻게 해야 합니까 To:?

편집: "명령줄에서는 파일을 첨부할 수 없다는 점에 유의하세요"는 적어도 매우 어렵다는 의미입니다.

답변1

불행하게도 이를 수행할 수 있는 좋은 방법이 없을 수도 있지만 아래는오토핫키대부분 작업을 완료하는 스크립트입니다.Wikipedia의 AutoHotkey 개요는 여기에 있습니다..

이 스크립트는 Windows Live Mail 2012가 설치된 Windows 7에서 테스트되었습니다. 스크립트의 시작 부분 대부분(최대 Run)은 일반적이지만 나머지는 구체적이며 다른 GUI 전자 메일 프로그램(예: Outlook 365, Thunderbird, 등)을 사용합니다.

기대

스크립트는 다음을 염두에 두고 작성되었습니다.

  • AutoHotkey는 스크립트를 실행하는 PC에 설치됩니다. 스크립트를 독립 실행형 실행 파일로 바꾸려면 다음을 확인하세요.ahk2exe.

  • 스크립트는 단일을 기대합니다AutoHotkey 스크립트 명령줄 매개변수— 이메일 주소. 이를 통해 하나의 스크립트가 (잠재적으로) 다양한 이메일 주소를 처리할 수 있습니다.

주소를 전달하려면 각 잠재적 주소에 대한 링크를 다음과 같이 생성해야 합니다.

"C:\Path\To\AutoHotkey\AutoHotkey.exe" "C:\Path\To\Script.ahk"  [email protected]
  • 균일한 작업과 명령줄 매개변수(스크립트 신뢰성 향상)를 사용하기 위해 스크립트는 종료된 다음 다시 시작됩니다 wlmail.exe. 따라서 이미 Windows Live Mail로 작업하고 있다면 실행하기 전에 작업 내용을 저장하십시오!

  • 스크립트는 클립보드를 사용합니다. 따라서 스크립트를 실행하기 전에 첨부하려는 항목을 Ctrl+ 해야 합니다.C

알려진 문제

불행하게도 저는 AutoHotkey Ninja가 아니므로 이 스크립트는 완벽하지 않을 수 있습니다. ;-)

그러나 며칠 간의 테스트 후에 아래 스크립트는 최소한 99%의 안정성을 보였습니다.

  • 때때로 타이밍 문제가 발생할 수 있습니다.F10 키 입력Windows Live Mail에서 인식되지 않는 스크립트입니다.

이는 주로 Windows Live Mail에 보다 안정적인 자동화 방법이 부족하기 때문입니다(예: 명령줄 첨부 없음, 비표준 리본 인터페이스 및 파일 첨부를 위한 단축키 콤보 없음).

  • "예약된 작업" 창이 나타나면 이로 인해 문제가 발생할 수도 있습니다.

  • 클립보드의 경로가 유효하지 않으면 스크립트를 수동으로 종료해야 할 수도 있습니다(아래 참조).

마지막으로, 스크립트 작업이 중단되면(Windows Live Mail이 열리는 지점에 도달하지 못합니다)원하는 아이템이 자동으로 부착됩니다), 빠른 실행 영역을 살펴보고 필요한 경우 다시 시도하기 전에 해당 스크립트 인스턴스를 종료했는지 확인해야 합니다.

Windows Live 메일에서 첨부 파일을 자동화하는 AutoHotkey 스크립트

사용

항목을 클립보드에 복사한 다음( Ctrl+ C가 가장 쉬움) 스크립트를 시작하는 링크를 클릭합니다(수신자의 이름도 명령줄 매개변수로 전달해야 함).

아래 스크립트 텍스트 전체를 표준 .txt파일에 복사/붙여넣고 (AutoHotkey 스크립트) 확장자로 이름을 바꿔야 합니다 .ahk.

; -- Functions & Variables --
; A custom to check if a given processes is active 
  ProcessExist(Name){
      Process,Exist,%Name%
      return Errorlevel
  }

; -- Begin Script --

; Command line parameter debug box. 
;MsgBox, The number of command line parameters is %0%. `n`n The email recipient is %1%

; Check for command line parameters - terminate if we have anything but one. 
If 0 <> 1
{
     MsgBox, You have not specified a valid email address. Script terminating.
     exitapp                        ; Exit our script
 }

; If our clipboard is empty, show a warning
If clipboard =
{
     MsgBox, 4, , Please copy your attachment to the clipboard.`n`nContinue?
     IfMsgBox, No, exitapp          ; Exit our script
}

ClipWait                            ; Wait for the clipboard to contain text.

;Display the last item copied to the clipboard to confirm this is the item we want. 
Loop, parse, clipboard, `n, `r
{
    MsgBox, 4, , File number %A_Index% for attachement is located at %A_LoopField%.`n`nEmail recipient is %1%.`n`nContinue?
    IfMsgBox, No, exitapp           ; Quit the AutoHotkey script if the user says no.
}

; Start with a clean Windows Live Mail instance. 
; wlmail.exe may active as a process so we make sure to kill it.

If ProcessExist("wlmail.exe")
    Process, Close, wlmail.exe

Sleep 100                           ; Make sure the process has time to terminate

; Start a fresh wlmail.exe process to send a new email.
; /mailurl:mailto: is part of the wlmail.exe command line options.
Run, "C:\Program Files (x86)\Windows Live\Mail\wlmail.exe" /mailurl:mailto:%1%

; Make sure our New Message window is active
WinWait, New Message, 
IfWinNotActive, New Message, , WinActivate, New Message, 
WinWaitActive, New Message,

; If the script is going to fail, it will be between the TAB TAB F10 4 strokes.

; Double TAB brings us to the body of the message. Otherwise, the address field is the first active
; item and F10 brings up a different menu.
Send, {TAB} {TAB}

; Show the attachment dialog via pressing F10 then 4.
; Increase the Sleep value for better key stroke reliability -- 5000+ recommended.
; Otherwise, Windows Live Mail seems to "miss" the F10 stroke.
Sleep 5000              
Send, {F10}
Send, 4 

; Make sure our Open file dialog is active
WinWait, Open, 
IfWinNotActive, Open, , WinActivate, Open, 
WinWaitActive, Open,  

; Copy our file path from the clipboard and open it
Send, {CTRLDOWN}v{CTRLUP}
Sleep 1000
Send {TAB}{TAB}{Enter}

exitapp                                 ; Exit our script

관련 정보