init: 三角洲行动开镜自动屏息脚本
按住鼠标右键时自动按下并保持配置的按键(默认 F12,对应游戏内屏息),松开右键时释放。 通过进程名识别游戏,仅在游戏运行时激活监听。 仓库内置 PortablePython 解释器与 pynput/psutil 依赖,下载即用。
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# coding=utf-8
|
||||
# pynput
|
||||
# Copyright (C) 2015-2024 Moses Palmér
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU Lesser General Public License as published by the Free
|
||||
# Software Foundation, either version 3 of the License, or (at your option) any
|
||||
# later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
The main *pynput* module.
|
||||
|
||||
This module imports ``keyboard`` and ``mouse``.
|
||||
"""
|
||||
|
||||
def _logger(cls):
|
||||
"""Creates a logger with a name suitable for a specific class.
|
||||
|
||||
This function takes into account that implementations for classes reside in
|
||||
platform dependent modules, and thus removes the final part of the module
|
||||
name.
|
||||
|
||||
:param type cls: The class for which to create a logger.
|
||||
|
||||
:return: a logger
|
||||
"""
|
||||
import logging
|
||||
return logging.getLogger('{}.{}'.format(
|
||||
'.'.join(cls.__module__.split('.', 2)[:2]),
|
||||
cls.__name__))
|
||||
|
||||
|
||||
from . import keyboard
|
||||
from . import mouse
|
||||
Reference in New Issue
Block a user