在坐标处打开文件资源管理器

时间:2016-12-28 17:20:19

标签: windows python-3.x batch-file explorer

当我启动计算机时,我会打开几个文件浏览器并在屏幕上对它们进行排序,以帮助加快我的工作流程。它不耗时,只是单调乏味,而且我喜欢一个小程序来为我做这件事。 我知道如何打开资源管理器,但我没有看到任何位置参数。

有没有办法在一组屏幕坐标处生成文件浏览器,或者在打开后以编程方式移动它?最好使用python 3+,但批处理也可以。

1 个答案:

答案 0 :(得分:3)

这比我想象的要容易和困难。一切都有评论,如果您有任何疑问,请告诉我。这是一个PowerShell /批处理混合脚本(因此将其保存为.bat文件),因为默认情况下系统会禁用PowerShell。

var express = require("express");
var app = express();
var rp = require('request-promise');

var options = {
    method: 'POST',
    uri: 'http://localhost:5000/receive_user_response',
    body: {
        some: 'payload'
    },
    json: true // Automatically stringifies the body to JSON
};

app.set('view engine', 'pug');
app.get('/', function(req, res) {

    rp(options).then(function(res) {
        console.log(res);

    }).catch(function(err) {
        console.log("error!");
    });

});

var server = app.listen(3000, function() {
    console.log("Listening on port %s...", server.address().port);
});