您为日常生活编写的最有用的脚本是什么? [英] What is the most useful script you've written for everyday life?

查看:68
本文介绍了您为日常生活编写的最有用的脚本是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道这里的人们写了哪些小脚本/程序来帮助他或她的日常生活(也就是与工作无关).

Just wondering what little scripts/programs people here have written that helps one with his or her everyday life (aka not work related).

一切顺利,无论是否具有开创性.对我现在来说,这是一个小型的 Python 脚本,用于计算给定距离和经过时间的跑步配速.

Anything goes, groundbreaking or not. For me right now, it's a small python script to calculate running pace given distance and time elapsed.

推荐答案

我的 o 键在我的笔记本电脑上掉了;所以我写了一个程序,将两个 0 键击替换为 o,两个 0 键击在 700 MS 内替换为 o作为 0 并忽略其余部分;这样我就可以在开始更换键盘之前使用我的笔记本电脑.

My o key fell off on my laptop; so I wrote a program that replaces two 0 keystrokes within 200 MS of each other as an o, two 0 keystrokes within 700 MS of each other as a 0 and ignore the rest; so I could use my laptop before I get around to replacing the keyboard.

哇;我不知道这会如此受欢迎:p

Wow; I didn't know this would be so popular :p

至于如何 - Microsoft 公开了一个不错的小 API 功能,称为 挂钩.

As for how - Microsoft exposes a nice little API feature called Hooks.

使用那个钩子;我能够编写一个过滤器"来完成我需要它做的事情(提示:如果你的回调窗口返回 1 将不会处理击键).

Using that hook; I was able to write a "filter" that did what I needed it to do (hint: if you return 1 with your callback windows will not process the keystroke).

我知道这件事的原因实际上并不是因为我在写一个键盘记录器 - 而是因为我写了一个程序微笑程序 不久前的协同作用.

The reason I know about this actually is not because I was writing a keylogger - but because I wrote a program smiler to Synergy a while ago.

是的.我确实写了另一个程序,用随机的字母数字键交换字母数字键,是的;真的很有趣:D

And yes. I did write another program that swapped alpha-numeric keys with a random alpha-numeric key and yes; it was really funny :D

这篇关于您为日常生活编写的最有用的脚本是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆