开发者

Open a script on workspace with just a link

Automater sends out an automated e-mail message that contains several links.

The links provided will call a script with different command line arguments depending on which link they clicked on.

So for example an e-mail would look like this:

  • Zipped contents located at this link \\intranet\nightbuild: click1
  • Click on this link unpack all compressed files 开发者_如何学Pythoninto your C:\somedirectory clicky2
  • Click on this link to unpack this (somezip) file into your C:\somedirectory clicky3

This is all done on outlook.

<a href="file:///C:/users/nickb/desktop/somepython.py">Click me!</a>

That's what I tried, but instead it just opens up the python script and I see its contents.


Opening links it Microsoft Outlook automatically open the file in the correct manner, however, I still had one problem, according to this link. Microsoft outlook does NOT allow you edit html in the outlook viewer, it follows the WYSIWYG (what you see is what you get) philosophy.

Thus all html must be handled by python in the MIME header. If using the smtplib from python follow this link and scroll to the bottom. The example is shown there.

NOTE: you have to include the MIMEText, and MIMEMultipart to handle smtp headers.

Thank you all for your help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜