简体   繁体   English

从 Edge 下载文件时,如何在 Windows 任务计划程序中运行 Python 脚本?

[英]How to run a Python script in Windows Task Scheduler when a file is downloaded from Edge?

I wrote a script using Python and I want it to be executed every time I download a file using Microsoft Edge.我使用 Python 编写了一个脚本,我希望每次使用 Microsoft Edge 下载文件时都执行它。 So, I thought about creating a task using Task Scheduler所以,我想到了使用任务计划程序创建一个任务

However, I don't know how to do it.但是,我不知道该怎么做。 I did some research but I found nothing.我做了一些研究,但我一无所获。 Here are the task's steps:以下是任务的步骤:

  1. click on the download button to download a file.单击下载按钮下载文件。
  2. set the path where the file will be saved(let's say the Downloads folder)设置文件的保存路径(比如下载文件夹)
  3. the task scheduler will start the task.任务调度程序将启动任务。
  4. the python script will be executed. python 脚本将被执行。

What you should do is to implement downloads.onChanged callback.你应该做的是实现downloads.onChanged回调。
With this, Edge will call your code when a file is being downloaded.这样,Edge 将在下载文件时调用您的代码。
Note that the implantation is based on javascript.请注意,植入是基于 javascript。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过任务计划程序运行时,Python脚本未创建文件 - Python Script not creating file when run through Task Scheduler 在 Windows 任务计划程序上运行 python 脚本时如何修复“上次运行结果 (0x2331)”? - How to fix "last run result (0x2331)" when running a python script on Windows Task Scheduler? 批处理文件中的Python脚本无法在任务计划程序中运行 - Python script from batch file won't run in task scheduler Python 脚本 Windows 任务调度程序 - Python Script Windows Task Scheduler 在 python 中运行复制文件脚本 27 在 Windows 任务计划程序中获取路径错误 errno22 - run copy file script in python 27 get path error errno22 in Windows Task Scheduler 无法安排 python 脚本通过 Windows 任务计划程序运行 - Cannot schedule a python script to run through Windows Task Scheduler Windows 任务计划程序无法运行 Python 脚本,错误值:2147944320 - Windows Task Scheduler unable to run Python Script, error value: 2147944320 为什么Windows 10 Task Scheduler执行我的Python脚本时会产生不同的运行 - Why does my Python script run differently when executed by Windows 10 Task Scheduler 下载文件时如何自动启动/运行 Python 脚本 (macOS) - How to start/run Python script automatically when file is downloaded (macOS) Windows 任务调度程序未运行 python 脚本/批处理文件 - Windows task scheduler not running python script/batch file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM