0
点赞
收藏
分享

微信扫一扫

个人日常行为规范

个人日常行为规范

本文链接:https://docs.qq.com/doc/DSVF2bWFRZ1BxRE5Y

本文二维码:个人日常行为规范_ico

一、健康管理

1、步行上下班通勤,多走多动,适量喝水。

2、提高穿衣、饮水、吃饭、居住环境、出行、睡觉、通讯联系交流的品质和数量。

3、科学合理的调整、改善、优化内心心理健康环境和外在的创作、生产、工作、生活、交流和娱乐的环境。

4、根据健康管理师教材内容科学合理的调整个人的日常行为。

二、个人信息管理方案

1、活动时间和电子文件管理总体规划:

用腾讯QQ授权登录的有道云笔记管理日常创作、工作、生活、交际和娱乐的日常活动时间。

用"ES文件浏览器"安卓应用、"RaiDrive_Standard_Edition_2021.10.9"连接群晖NAS的WebDAV文件服务和Synology_Secure_Signln批准登录群晖QuickConnect这3种方式管理群晖DS920+网络存储服务器中的电子文件。

2、以两项工具软件为主,以其他工具软件为辅助:

在使用有道云笔记管理日常活动时间安排和使用群晖DS920+网络存储服务器管理电子文件以外可以使用腾讯文档、阿里云盘、腾讯QQ、腾讯微信、电脑桌面等应用程序软件作为电子文件管理的辅助工具。

3、一些使用规定和习惯:

有道云笔记只用于记录备忘云笔记,不做他用。

每月1日新建一个笔记文件,并置顶当月笔记。

笔记标题格式为:“备忘云笔记202201”。

备忘记录格式为:“正方形复选框&4位数月日&记录内容(重点&时间&地点)”

备忘记录举例:“□0127党员冬训大会27日9:30管委会三楼”

群晖DS920+网络存储服务器使用群晖自带的DDNS和华硕路由器自带的免费动态域名解析,这两种动态域名解析同时运行互为容灾备份。端口映射转发端口选用5位数冷门端口号。群晖DS920+网络存储服务器使用4块容量为16TB的机械硬盘组建RAID1镜像,并启用共享文件夹的回收站功能,从而有效的保护文件数据,有效防止发生因为用户误操作或者机械磁盘损坏引起的丢失文件数据事件的发生。

三、电脑软件管理

1、根据不同电脑软件的特点进行合理分类并压缩打包制作自动静默安装包或绿色单文件免安装自解压exe可执行文件。除了Windows操作系统和少量需重启的软件以外,绝大多数电脑软件应当在鼠标单次双击时能显示并激活主窗口或者实现主要功能(无需按下一步按钮或者按回车键)。

2、电脑软件的默认安装目的文件路径为:D:\Program\软件名称\软件名称.exe

软件名称选择软件主窗口标题的一部分或者全部,优先使用英文名称。

电脑软件类别1:当电脑软件无需安装、没有个性化配置、没有数据文件并且小于100MB时直接采用TempMod临时解压模式运行。

【静默安装实例1】:eXeScope无用户数据和用户配置所以采用解压缩到临时文件夹的方法压缩打包(由于eXeScope会产生ini配置文件,为了文件夹D:\Program的整洁所以压缩打包)

;下面的注释包含自解压脚本命令

Setup=eXeScope.exe

TempMode

Silent=1

Overwrite=1

电脑软件类别2:当电脑软件无需安装并且有个性化配置或者有数据文件或者大于100MB时先解压缩到文件夹D:\Program\软件名称然后再运行电脑软件。

【静默安装实例2】:自动静默安装KeePass、解压缩自定义配置文件KeePass.config.xml并运行KeePass连接坚果云或者群晖NAS的WebDAV文件服务统一集中管理网址用户名密(口)码(令)备忘记录

;下面的注释包含自解压脚本命令

;Path=解压缩路径

;Presetup=解压缩前运行

;Setup=解压缩后运行

;Silent=静默方式:1-隐藏全部 2-隐藏启动对话框 空着不设置-显示全部

;Overwrite=覆盖方式:1-覆盖全部文件 2-跳过已存在的文件 空着不设置-覆盖前询问

;请选择正确的图标并保存正确的配置文件

Path=D:\Program\KeePass

Setup=KeePass.exe

Silent=1

Overwrite=2

电脑软件类别3:当电脑软件需安装后才能使用时用带/s或者/silent参数的批处理脚本自动静默安装电脑软件然后再运行电脑软件。

【静默安装实例3】:自动静默安装AutoHotkey和SciTE4AutoHotkey并设置ahk文件关联和ahk文件的右键中文菜单

;下面的注释包含自解压脚本命令

;Path=解压缩路径

;Presetup=解压缩前运行

;Setup=解压缩后运行

;Silent=静默方式:1-隐藏全部 2-隐藏启动对话框 空着不设置-显示全部

;Overwrite=覆盖方式:1-覆盖全部文件 2-跳过已存在的文件 空着不设置-覆盖前询问

;请选择正确的图标并保存正确的配置文件

Path=D:\Program\AutoHotkey

Setup=Silent_Setup.bat

Silent=2

Overwrite=2

REM /*

REM =======================================================

REM Silent_Setup.bat

  • Silent_Setup.bat - 自动静默安装AutoHotkey和SciTE4AutoHotkey的批处理脚本

REM

REM 文件 : D:\Program\AutoHotkey\Silent_Setup.bat

REM

REM 脚本作者 : ds920

REM 最新版本 : 1.0.1

REM 更新时间 : 2022年1月26日

REM

REM 项目主页 : https://gitee.com/ds920

REM

REM 用法: (需要Windows系统的电脑)

REM 1. 鼠标双击用WinRAR x86 32位 压缩软件 打包成的SFX自解压exe可自行自动静默安装包文件

REM

REM =======================================================

REM */

START "" "%~dp0"AutoHotkey_1.1.33.10_setup.exe /S /A32 /U32 /U64 /D=D:\Program\AutoHotkey\ /WAIT

REM 等待3秒钟,以便让AHK文件关联生效,使ahk脚本能够顺利运行

ping -n 3 127.0.0.1>nul 2>nul

REM 设置AHK文件关联、汉化AHK文件右键菜单(运行脚本、编译脚本、编译脚本(GUI)、编辑脚本)

REM 脚本说明: 此工具用来修改 AutoHotkey 脚本的右键菜单关联,适用于 AutoHotkey 安装版、绿(免)色(装)版。

REM 作者: 甲壳虫<jdchenjian@gmail.com>

REM 修改作者: 兔子

REM 修改作者: ds920

START "" "%~dp0"SciTE\_Linked.ahk

/*

作者: 甲壳虫<jdchenjian@gmail.com>

博客: http://hi.baidu.com/jdchenjian

脚本说明: 此工具用来修改 AutoHotkey 脚本的右键菜单关联,适用于 AutoHotkey 安装版、绿(免)色(装)版。

脚本版本: 2009-01-21

修改作者: 兔子

更新说明:

2010.01.09 之前某个时间,修改AHK路径、编辑器路径、编译器路径,默认全部在当前目录下寻找

2010.01.09 去掉默认在新建菜单的勾

2010.06.21 如果SCITE为默认编辑器,则复制个人配置文件“SciTEUser.properties”到%USERPROFILE%

2010.06.25 修正因#NoEnv使%USERPROFILE%变量直接引用无效

2016.04.18 删除“2010.06.21”的改动

2021.10.17 新增“编译脚本 (GUI)”的汉化

2021.11.02 自动根据 AutoHotkey.exe 的位置定位基准目录。

2021.11.05 重构代码,精简界面,修复新建模板时的编码问题,修复编辑模板时的权限问题。

修改作者 : ds920

; === ds920 修改 2022年1月11日 = 第31行 ===

; === ds920 修改 2022年1月11日 = 第124行 ===

; === ds920 修改 2022年1月11日 = 第189到191行 ===

; === ds920 修改 2022年1月11日 = 第242行 ===

更新说明:

2022.01.11 注释掉部分AutoHotkey语句,让其他脚本能够静默调用此AHK脚本,

实现AHK文件关联和汉化鼠标右键中文菜单

2022.01.11 #SingleInstance, force 改成 #SingleInstance, Ignore 防止出现等待的提示窗口

*/

#NoEnv

; === ds920 修改 2022年1月11日 = 第31行 ===

#SingleInstance, Ignore

SendMode Input

SetWorkingDir %A_ScriptDir%

; 版本(仅用于显示)

Script_Version=ver. 1.1

; AutoHotkey 原版的相关信息写在注册表HKCR主键中,

; 尝试当前用户否有权操作该键,如果无权操作HKCR键(受限用户),

; 可通过操作注册表HKCU键来实现仅当前用户关联AHK脚本。

RegWrite, REG_SZ, HKCR, .test

if ErrorLevel

IsLimitedUser:=1

RegDelete, HKCR, .test

if ErrorLevel

IsLimitedUser:=1

if IsLimitedUser

{

RootKey=HKCU ; 受限用户操作HKCU键

Subkey=Software\Classes\ ; 为简化后面的脚本,此子键须以“\”结尾

}

else

{

RootKey=HKCR ; 非受限用户操作HKCR键

Subkey=

}

; 检查是否存在AHK注册表项

RegRead, FileType, %RootKey%, %Subkey%.ahk

if (FileType!="")

{

RegRead, value, %RootKey%, %Subkey%%FileType%\Shell\Open\Command ; AHK路径

AHK_Path:=PathGetPath(value)

RegRead, value, %RootKey%, %Subkey%%FileType%\Shell\Compile\Command ; 编译器路径

Compiler_Path:=PathGetPath(value)

RegRead, value, %RootKey%, %Subkey%%FileType%\Shell\Edit\Command ; 编辑器路径

Editor_Path:=PathGetPath(value)

RegRead, Template_Name, %RootKey%, %Subkey%.ahk\ShellNew, FileName ; 模板文件名

}

else

FileType=AutoHotkeyScript

; 通过 AutoHotkey.exe 的位置来定位基准目录

SplitPath, A_AhkPath, , AhkDir

if AHK_Path=

{

IfExist, %AhkDir%\AutoHotkey.exe

AHK_path=%AhkDir%\AutoHotkey.exe

}

if Compiler_Path=

{

IfExist, %AhkDir%\Compiler\Ahk2Exe.exe

Compiler_Path=%AhkDir%\Compiler\Ahk2Exe.exe

}

if Editor_Path=

{

IfExist, %AhkDir%\SciTE\SciTE.exe

Editor_Path=%AhkDir%\SciTE\SciTE.exe

}

if Template_Name=

Template_Name=Template.ahk

Gui, Font, bold s15

Gui, Add, Text, x10 y10 w480 h290, %A_Space%设置并汉化 .ahk 文件的右键菜单

Gui, Font

Gui, Add, GroupBox, x20 y50 w460 h50 , “运行脚本”

Gui, Add, Edit, x35 y70 w340 h20 vAHK_Path, %AHK_path%

Gui, Add, Button, x385 y70 w40 h20 gFind_AHK, 浏览

Gui, Add, GroupBox, x20 y110 w460 h50 , “编译脚本”

Gui, Add, Edit, x35 y130 w340 h20 vCompiler_Path, %Compiler_Path%

Gui, Add, Button, x385 y130 w40 h20 gChoose_Compiler, 浏览

Gui, Add, Button, x430 y130 w40 h20 gDefault_Compiler, 默认

Gui, Add, GroupBox, x20 y170 w460 h50 , “编辑脚本”

Gui, Add, Edit, x35 y190 w340 h20 vEditor_Path, %Editor_Path%

Gui, Add, Button, x385 y190 w40 h20 gChoose_Editor, 浏览

Gui, Add, Button, x430 y190 w40 h20 gDefault_Editor, 默认

Gui, Add, GroupBox, x20 y230 w460 h50 , “新建脚本”

Gui, Add, Button, x35 y250 w340 h20 gEdit_Template, 自定义新建脚本的模板

Gui, Font, bold s15

Gui, Add, Button, x20 y300 w200 h40 Default gInstall, 设置

Gui, Add, Button, x280 y300 w200 h40 gCancel, 取消

; === ds920 修改 2022年1月11日 = 第124行 ===

gosub, Install

if (A_Args.1="/set")

gosub, Install

else

Gui, Show, x250 y200 h350 w500 Center, AHK 脚本关联工具 %Script_Version%

return

GuiClose:

GuiEscape:

Cancel:

ExitApp

return

; 查找 AutoHotkey 主程序

Find_AHK:

Gui +OwnDialogs

FileSelectFile, AHK_Path, 3, , 查找 AutoHotkey.exe, AutoHotkey.exe

if (AHK_Path!="")

GuiControl,,AHK_Path, %AHK_Path%

gosub Default_Compiler

return

; 选择脚本编译器

Choose_Compiler:

Gui +OwnDialogs

FileSelectFile, Compiler_Path, 3, , 选择脚本编译器, 程序(*.exe)

if (Compiler_Path!="")

GuiControl,,Compiler_Path, %Compiler_Path%

return

; 默认脚本编译器

Default_Compiler:

GuiControlGet, AHK_Path

SplitPath, AHK_Path, ,AHK_Dir

IfExist, %AHK_Dir%\Compiler\Ahk2Exe.exe

{

Compiler_Path=%AHK_Dir%\Compiler\Ahk2Exe.exe

GuiControl,, Compiler_Path, %Compiler_Path%

}

return

; 选择脚本编辑器

Choose_Editor:

Gui +OwnDialogs

FileSelectFile, Editor_Path, 3, , 选择脚本编辑器, 程序(*.exe)

if (Editor_Path!="")

GuiControl,,Editor_Path, %Editor_Path%

return

; 默认脚本编辑器

Default_Editor:

IfExist, %AhkDir%\SciTE\SciTE.exe

Editor_Path=%AhkDir%\SciTE\SciTE.exe

else ifExist, %A_WinDir%\system32\notepad.exe

Editor_Path=%A_WinDir%\system32\notepad.exe

GuiControl,, Editor_Path, %Editor_Path%

return

; 设置

Install:

Gui, Submit

; === ds920 修改 2022年1月11日 = 第189到191行 ===

AHK_Path:="D:\Program\AutoHotkey\AutoHotkey.exe"

Compiler_Path:="D:\Program\AutoHotkey\Compiler\Ahk2Exe.exe"

Editor_Path:="D:\Program\AutoHotkey\SciTE\SciTE.exe"


IfNotExist, %AHK_Path%

{

MsgBox, 16, , AutoHotkey 路径错误 !

return

}

IfNotExist, %Compiler_Path%

{

MsgBox, 16, , 编译器路径错误 !

return

}

IfNotExist, %Editor_Path%

{

MsgBox, 16, , 编辑器路径错误 !

return

}

; 写入注册表

RegWrite, REG_SZ, %RootKey%, %Subkey%.ahk,, %FileType%

RegWrite, REG_SZ, %RootKey%, %Subkey%.ahk\ShellNew, FileName, %Template_Name%

IfNotExist, %A_WinDir%\ShellNew\%Template_Name%

gosub Create_Template

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%,, AutoHotkey 脚本

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\DefaultIcon,, %AHK_Path%`,1

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell,, Open

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Open,, 运行脚本

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Open\Command,, "%AHK_Path%" "​​%1" ​​%*

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Compile,, 编译脚本

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Compile-Gui,, 编译脚本 (GUI)

IfInString, Compiler_Path, Ahk2Exe.exe

{

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Compile\Command,, "%Compiler_Path%" /in "`%1"

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Compile-Gui\Command,, "%Compiler_Path%" /gui /in "`%1"

}

else

{

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Compile\Command,, "%Compiler_Path%" "`%1"

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Compile-Gui\Command,, "%Compiler_Path%" /gui "`%1"

}

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Edit,, 编辑脚本

RegWrite, REG_SZ, %RootKey%, %Subkey%%FileType%\Shell\Edit\Command,, "%Editor_Path%" "`%1"

; === ds920 修改 2022年1月11日 = 第242行 ===

; MsgBox, 64, , 设置完毕 !

ExitApp

return

; 编辑脚本模板

Edit_Template:

GuiControlGet, Editor_Path

IfNotExist, %Editor_Path%

{

MsgBox, 64, , 脚本编辑器路径错误 !

return

}

IfNotExist, %A_WinDir%\ShellNew\%Template_Name%

gosub Create_Template

ifExist, %A_WinDir%\system32\notepad.exe

Run, *RunAs notepad.exe %A_WinDir%\ShellNew\%Template_Name%

else

Run, *RunAs %Editor_Path% %A_WinDir%\ShellNew\%Template_Name%

return

; 新建脚本模板

Create_Template:

FileAppend,

(

#NoEnv

SendMode Input

SetWorkingDir ​​%A_ScriptDir​​%

), %A_WinDir%\ShellNew\%Template_Name%, UTF-8

IfNotExist, %A_WinDir%\ShellNew\%Template_Name%

MsgBox, 64, , 无法创建脚本模板 !​​n​​n请尝试使用管理员权限运行本工具。

return

; 从注册表值字符串中提取路径

PathGetPath(pSourceCmd)

{

local Path, ArgsStartPos = 0

if (SubStr(pSourceCmd, 1, 1) = """")

Path := SubStr(pSourceCmd, 2, InStr(pSourceCmd, """", False, 2)

  • ath := SubStr(pSourceCmd, 2, InStr(pSourceCmd, """", False, 2) - 2)

else

{

ArgsStartPos := InStr(pSourceCmd, " ")

if ArgsStartPos

Path := SubStr(pSourceCmd, 1, ArgsStartPos

  • Path := SubStr(pSourceCmd, 1, ArgsStartPos - 1)

else

Path = %pSourceCmd%

}

return Path

}

; 此文件的完整路径:D:\Program\AutoHotkey\SciTE\user\UserToolbar.properties

; SciTE4AutoHotkey toolbar user settings file

;

; You are encouraged to edit this file!

;

; Tool definitions are in the following format:

; =Tool Name|Command line|Hotkey (optional)|Icon (optional)

; Paths support the following variables:

; %FILENAME% represents the filename of the current script

; %FILEPATH% represents the path to the current script

; %FULLFILENAME% represents the path and filename of the current script

; %SCITEDIR% represents the directory where SciTE resides

; %USERDIR% represents the user SciTE directory (My Documents\AutoHotkey\SciTE)

; %PLATFORM% represents the active platform

; %LOCALAHK% is the path of SciTE4AutoHotkey's internal copy of AutoHotkey.exe

; %AUTOHOTKEY% is the path of AutoHotkey.exe

; %ICONRES% is the toolbar icon library

; Use

  • se - or -- to add separators.

; Place here your tools

; Place here your scriptlets (required by the Scriptlet Utility)

;--

;=代码格式化 (Auto-Syntax-Tidy) (Ctrl+4)|%LOCALAHK% tools\Auto-Syntax-Tidy\Auto-Syntax-Tidy_v12.ahk|^4

--

=窗口信息( AHKInfo 1.3.5 )|%SCITEDIR%\tools\AHKInfo\AHKInfo.ahk||%ICONRES%,9

=窗口信息(ViewWizard)|%SCITEDIR%\tools\ViewWizard\ViewWizard.exe||%SCITEDIR%\tools\ViewWizard\ico-viewwizard.ico

=窗口信息(WindowSpy)|%SCITEDIR%\tools\WindowSpy\WindowSpy.ahk||%ICONRES%,8

=窗口信息(AU3_Spy)|%SCITEDIR%\tools\AU3_Spy\AU3_Spy.exe||%ICONRES%,12

=颜色信息(ColorFinder)|%SCITEDIR%\tools\ColorFinder\ColorFinder.exe||%ICONRES%,10

=提取图标修改资源(eXeScope)|%SCITEDIR%\tools\eXeScope\eXeScope.exe||%SCITEDIR%\tools\eXeScope\eXeScope.ico

=类别标识符(CLISD)|%SCITEDIR%\tools\CLISD\CLISD.exe||%ICONRES%,7

--

=宏录制(Au3Record)|%SCITEDIR%\tools\Au3Record\Au3Record.exe||%SCITEDIR%\tools\Au3Record\Au3Record.ico

=宏录制(AutoScriptWriter)|%SCITEDIR%\tools\AutoScriptWriter\AutoScriptWriter.exe||%SCITEDIR%\tools\AutoScriptWriter\AutoScriptWriter.ico

=宏录制(PuloversMacroCreator)(Ctrl+1)|%SCITEDIR%\tools\MacroCreator\MacroCreator.exe||%SCITEDIR%\tools\MacroCreator\ico-MacroCreator.ico

=爱码源码仓库(Ctrl+3)|%SCITEDIR%\tools\iCodeRepository3\iCodeRepository3.exe||%SCITEDIR%\tools\iCodeRepository3\iCodeRepository3.ico

;=窗口信息工具 (AHK_Window_Info) (Ctrl+6)|%SCITEDIR%\..\AutoHotkeyU32.exe tools\AHK_Window_Info\AHK_Window_Info_v1.7.ahk|^6|%ICONRES%,9

【静默安装实例4】:自动静默安装Maye、TotalCommander、Everything和有道云笔记并设置快捷键


Maye一个简洁小巧的快速启动工具

​​​https://blog.arae.cc/post/25830.html​​

​​​https://github.com/25H/Maya/releases/latest​​

​​​https://www.lanzoux.com/b0bqwqjvg​​


由于TotalCommander、Everything和有道云笔记需要通过Maye设置快捷键所以这4个软件合并在一起打包成单个exe可自行压缩包程序。

激活Maye主窗口的快捷键设置为默认的{Alt}+空格

激活TotalCommander主窗口的快捷键设置为`(即~键,此键位于主键盘区数字1的左边)

激活Everything主窗口的快捷键设置为{F8}

激活有道云笔记主窗口的快捷键设置为{F10}

;下面的注释包含自解压脚本命令

Path=D:\Program

Setup=D:\Program\Maye\Maye.exe

Silent=2

Overwrite=2

【静默安装实例5】:自动静默安装GoodSync压缩解压缩软件

;下面的注释包含自解压脚本命令

Setup=GoodSync_Ent_11.10.1.1.exe /SILENT

TempMode

Silent=1

Overwrite=1

说明:由于这个GoodSync_Ent_11.10.1.1.exe文件是我收藏的 Cracked Silent Install Repack and Portable 版本,所以带有自制的 /SILENT 参数。如果找不到称心如意的电脑软件也可以用Embarcadero.Delphi.11.0.v28.0.42600.6491.Lite.v17.0.zip或者Microsoft_Visual Studio

_Enterprise_2022_17.0.5.exe来自己制作一款完全符合自己使用习惯和使用要求的私人订制的电脑应用程序软件。

【静默安装实例6】:自动静默安装Delphi7到Windows11

; 无人值守全自动静默安装Delphi7到Windows11的AutoHotkey脚本2022年1月9日

; FileName := A_Setup_Delphi7.ahk

#SingleInstance,Ignore

loop,5

{

DetectHiddenWindows,On

Sleep,5

IfWinExist,E-Mail-595076941@QQ.COM

ExitApp

}

Gui, Show, Hide,E-Mail-595076941@QQ.COM

#Persistent

; #NoTrayIcon

DetectHiddenWindows,On

SetTitleMatchMode,2

; 启动Delphi7安装程序

SetTimer,SetupTimer,500

return

SetupTimer()

{

; 1、如果程序没有运行则运行程序

Process,Exist,Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

if (%ErrorLevel%=0)

{

IfExist,%A_ScriptDir%\Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

{

Run,%A_ScriptDir%\Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

}

else

{

MsgBox,找不到文件 %A_ScriptDir%\Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

return

}

}

IfWinNotExist,安装向导

  • WinNotExist,安装向导 - Delphi 7 Lite Full Edition,正在你的计算机中安装 Delphi 7 Lite Full Edition,请稍等...

{

ControlSend, TNewButton1,{Space}, 选择安装语言 ahk_class TSelectLanguageForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 取消

ControlSend, Button1,{Space}, 安装向导 ahk_class #32770 ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 本程序为Window

ControlSend, TNewButton1,!i, 安装向导

  • ontrolSend, TNewButton1,!n, 安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 取消
  • ontrolSend, TNewButton1,!i, 安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 取消

}

IfWinExist,安装向导

  • WinExist,安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm,安装向导已完成 Delphi 7 Lite Full Edition 的安装

{

SetTimer,SetupTimer,Delete

ControlClick, TNewButton5, 安装向导

  • ontrolClick, TNewButton5, 安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp,安装向导已完成 Delphi 7 Lite Full Edition 的安装

MsgBox,,,已成功安装Delphi7Lite编程软件,2

ExitApp

}

}

在制作自动静默安装电脑软件的AutoHotkey脚本时可以用测试一行或者几行代码的执行效果。

;

;

; AutoHotkey代码测试助手

; 2022年1月15日

; By ds920

;

; 用法:

; 第1步:运行此脚本

; 第2步:在SciTE4AutoHotkey窗口中选中需要测试的代码

; 第3步:按快捷键F4,此脚本会将选中的代码复制到新的独立的待测试脚本文件中

; 第4步:调整被测试相关窗口的位置和大小

; 第5步:按快捷键F6,开始测试选中的代码,

; 由于选中的代码通常只有一行或者几行,

; 测试代码很少具有针对性,

; 不易混淆,提高了测试效果和效率.

;

; 专注于测试一行或者少量的几行代码更容易测试成功并且得到正确的代码语句

;

; 源代码下载网址:

; https://gitee.com/ds920/CodeTestHelper

; https://www.cnblogs.com/delphixx/p/15806255.html

;

; 设置环境变量

#SingleInstance,force

#Persistent

#NoEnv

#WinActivateForce

;~ #NoTrayIcon

;~ #Warn

SetWorkingDir,%A_ScriptDir%

DetectHiddenWindows,On

SetTitleMatchMode,2

;

; 设置变量

global SciTE_Path

SciTE_Path:="D:\Program\AutoHotkey\SciTE"

global TestAHK_Name

global TestAHK_FullPath

;

; 创建热键

Hotkey,F4,HotkeyF4

Hotkey,F6,HotkeyF6

ToolTip,请选中需要测试的AHK代码 并按快捷键F4复制代码

SetTimer, RemoveToolTip, -8000

;

return

;

HotkeyF4()

{

TestAHK_Name=Test_%A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec%

TestAHK_FullPath=D:\AHKCode\TestCode\%TestAHK_Name%.ahk

Send,^c

FileCreateDir,D:\AHKCode\TestCode

FileAppend, ; 这里需要逗号.

(

#SingleInstance,force

#Persistent

#NoEnv

#WinActivateForce

;~ #NoTrayIcon

;~ #Warn

SetWorkingDir,%A_ScriptDir%

DetectHiddenWindows,On

SetTitleMatchMode,2

;

), %TestAHK_FullPath%

; MsgBox,%TestAHK_FullPath%

Run,%SciTE_Path%\SciTE.exe %TestAHK_FullPath%

Sleep,1000

Send,^{End}

Sleep,200

Send,{Enter 2}

Sleep,500

Send,^v

ToolTip,保存脚本之后 按快捷键F6开始测试

SetTimer, RemoveToolTip, -8000

}

;

HotkeyF6()

{

ToolTip,测试编号:%TestAHK_Name%

; Send,^s

Run,%TestAHK_FullPath%

SetTimer, RemoveToolTip, -8000

}

;

RemoveToolTip:

ToolTip

return

;

; MsgBox,Msg123

;

; 我会在空余时间用微软的 Visual Studio 2015 简体中文版中的 C

  • 会在空余时间用微软的 Visual Studio 2015 简体中文版中的 C++ 语言 和

; 简体中文汉化版 Embarcadero.Delphi.11.0.v28.0.42600.6491.Lite.v17.0 中的Pascal 语言

; 重新制作,重构,优化,测试,改进,分享,发布此"代码测试工具"

;

; 使得此"代码测试工具"能够辅助 AutoHotkey,AutoIT,

; C++(Visual Studio 2015 简体中文版),Pascal(Embarcadero.Delphi.11.0简体中文汉化版),

; Python,JAVA 和 C# 的代码编程制作开发科学研究测试部署.

; 常见的窗口PSY嗅探检测工具有:

; 001-星雨朝霞的AHKInfo 1.3.5

; 002

  • 002-FindText()8.6- 屏幕抓字生成字库工具与找字函数——FeiYue

; 003-ViewWinzard 2.63

; 004-WindowSpy

; 005-AHK_Window_Info

; 006-Spy++

; 007-MacroCreator

; 008-AU3Record

; 009-AutoScriptWrite

; 010-PuloversMacroCreator

/*

; 我常用的SetTimer循环操作代码结构

; ----- 1 -----

#SingleInstance,Ignore

#Persistent

runwith("admin")

loop,5

{

DetectHiddenWindows,On

Sleep,5

IfWinExist,7z-E-Mail-595076941@QQ.COM

ExitApp

}

Gui, Show, Hide,7z-E-Mail-595076941@QQ.COM

DetectHiddenWindows,On

SetTitleMatchMode,2

; 启动7z安装程序

SetTimer,SetupTimer,500

return

SetupTimer()

{

; 1、如果程序没有运行则运行程序

Process,Exist,7z2106.exe

if (%ErrorLevel%=0)

{

IfExist,%A_ScriptDir%\7z2106.exe

{

Run,%A_ScriptDir%\7z2106.exe

}

else

{

MsgBox,找不到文件 %A_ScriptDir%\7z2106.exe

return

}

}

ControlSend, Button2,{Space}, 7-Zip 21.06 Setup ahk_class #32770 ahk_exe 7z2106.exe, Cancel

Sleep,2000

IfWinExist,7-Zip,installed

{

SetTimer,SetupTimer,Delete

ControlSend, Button2,{Space}, 7-Zip 21.06 Setup ahk_class #32770 ahk_exe 7z2106.exe, Cancel

MsgBox,,,已成功安装7-Zip软件,2

ExitApp

}

}

; 非常感谢 RunWith() 函数作者 空

; 这个 RunWith() 函数解决了我的一大难题

; https://www.autoahk.com/archives/35533

; 强制自身进程以 管理员权限 或 普通权限 或 ANSI 或 U32 或 U64 版本运行。

; 例1: runwith("admin","u32") 强制自身以 u32

  • 1: runwith("admin","u32") 强制自身以 u32 + 管理员权限 运行。

; 例2: runwith("","ansi") 强制自身以 ansi 版本运行(权限不变)。

; 例3: runwith("normal") 强制自身以 普通权限 运行(版本不变)。

RunWith(RunAsAdmin:="Default", ANSI_U32_U64:="Default")

{

; 格式化预期的模式

switch, RunAsAdmin

{

case "Normal","Standard","No","0": RunAsAdmin:=0

case "Admin","Yes","1": RunAsAdmin:=1

case "Default": RunAsAdmin:=A_IsAdmin

default: RunAsAdmin:=A_IsAdmin

}

switch, ANSI_U32_U64

{

case "A32","ANSI","A": ANSI_U32_U64:="AutoHotkeyA32.exe"

case "U32","X32","32": ANSI_U32_U64:="AutoHotkeyU32.exe"

case "U64","X64","64": ANSI_U32_U64:="AutoHotkeyU64.exe"

case "Default": ANSI_U32_U64:="AutoHotkey.exe"

default: ANSI_U32_U64:="AutoHotkey.exe"

}

; 获取传递给 “.ahk” 的用户参数(不是 /restart 之类传递给 “.exe” 的开关参数)

for k, v in A_Args

{

if (RunAsAdmin=1)

{

; 转义所有的引号与转义符号

v:=StrReplace(v, "\", "\\")

v:=StrReplace(v, """", "\""")

; 无论参数中是否有空格,都给参数两边加上引号

; Run 的内引号是 "

ScriptParameters .= (ScriptParameters="") ? """" v """" : A_Space """" v """"

}

else

{

; 转义所有的引号与转义符号

; 注意要转义两次 Run 和 RunAs.exe

v:=StrReplace(v, "\", "\\")

v:=StrReplace(v, """", "\""")

v:=StrReplace(v, "\", "\\")

v:=StrReplace(v, """", "\""")

; 无论参数中是否有空格,都给参数两边加上引号

; RunAs.exe 的内引号是 \"

ScriptParameters .= (ScriptParameters="") ? "\""" v "\""" : A_Space "\""" v "\"""

}

}

; 判断当前 exe 是什么版本

if (!A_IsUnicode)

RunningEXE:="AutoHotkeyA32.exe"

else if (A_PtrSize=4)

RunningEXE:="AutoHotkeyU32.exe"

else if (A_PtrSize=8)

RunningEXE:="AutoHotkeyU64.exe"

; 运行模式与预期相同,则直接返回。 ANSI_U32_U64="AutoHotkey.exe" 代表不对 ahk 版本做要求。

if (A_IsAdmin=RunAsAdmin and (ANSI_U32_U64="AutoHotkey.exe" or ANSI_U32_U64=RunningEXE))

return

; 如果当前已经是使用 /restart 参数重启的进程,则报错避免反复重启导致死循环。

else if (RegExMatch(DllCall("GetCommandLine", "str"), " /restart(?!\S)"))

{

预期权限:=(RunAsAdmin=1) ? "管理员权限" : "普通权限"

当前权限:=(A_IsAdmin=1) ? "管理员权限" : "普通权限"

ErrorMessage=

(LTrim

预期使用: %ANSI_U32_U64%

当前使用: %RunningEXE%

预期权限: %预期权限%

当前权限: %当前权限%

程序即将退出。

)

MsgBox 0x40030, 运行状态与预期不一致, %ErrorMessage%

ExitApp

}

else

{

; 获取 AutoHotkey.exe 的路径

SplitPath, A_AhkPath, , Dir

if (RunAsAdmin=0)

{

; 强制普通权限运行

switch, A_IsCompiled

{

; %A_ScriptFullPath% 必须加引号,否则含空格的路径会被截断。%ScriptParameters% 必须不加引号,因为构造时已经加了。

; 工作目录不用单独指定,默认使用 A_WorkingDir 。

case, "1": Run, RunAs.exe /trustlevel:0x20000 "\"%A_ScriptFullPath%\" /restart %ScriptParameters%",, Hide

default: Run, RunAs.exe /trustlevel:0x20000 "\"%Dir%\%ANSI_U32_U64%\" /restart \"%A_ScriptFullPath%\" %ScriptParameters%",, Hide

}

}

else

{

; 强制管理员权限运行

switch, A_IsCompiled

{

; %A_ScriptFullPath% 必须加引号,否则含空格的路径会被截断。%ScriptParameters% 必须不加引号,因为构造时已经加了。

; 工作目录不用单独指定,默认使用 A_WorkingDir 。

case, "1": Run, *RunAs "%A_ScriptFullPath%" /restart %ScriptParameters%

default: Run, *RunAs "%Dir%\%ANSI_U32_U64%" /restart "%A_ScriptFullPath%" %ScriptParameters%

}

}

ExitApp

}

}

; -----2-----

#SingleInstance,Ignore

loop,5

{

DetectHiddenWindows,On

Sleep,5

IfWinExist,E-Mail-595076941@QQ.COM

ExitApp

}

Gui, Show, Hide,E-Mail-595076941@QQ.COM

#Persistent

; #NoTrayIcon

DetectHiddenWindows,On

SetTitleMatchMode,2

; 启动7z安装程序

SetTimer,SetupTimer,500

return

SetupTimer()

{

; 1、如果程序没有运行则运行程序

Process,Exist,Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

if (%ErrorLevel%=0)

{

IfExist,%A_ScriptDir%\Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

{

Run,%A_ScriptDir%\Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

}

else

{

MsgBox,找不到文件 %A_ScriptDir%\Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.exe

return

}

}

IfWinNotExist,安装向导

  • inNotExist,安装向导 - Delphi 7 Lite Full Edition,正在你的计算机中安装 Delphi 7 Lite Full Edition,请稍等...

{

ControlSend, TNewButton1,{Space}, 选择安装语言 ahk_class TSelectLanguageForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 取消

ControlSend, Button1,{Space}, 安装向导 ahk_class #32770 ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 本程序为Window

ControlSend, TNewButton1,!i, 安装向导

  • trolSend, TNewButton1,!n, 安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 取消
  • trolSend, TNewButton1,!i, 安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp, 取消

}

IfWinExist,安装向导

  • inExist,安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm,安装向导已完成 Delphi 7 Lite Full Edition 的安装

{

SetTimer,SetupTimer,Delete

ControlClick, TNewButton5, 安装向导

  • trolClick, TNewButton5, 安装向导 - Delphi 7 Lite Full Edition ahk_class TWizardForm ahk_exe Delphi7_Lite_Full_Edition_Setup_7.3.4.3_Build_20110801.tmp,安装向导已完成 Delphi 7 Lite Full Edition 的安装

MsgBox,,,已成功安装Delphi7Lite编程软件,2

ExitApp

}

}

; ----- End -----

*/



个人日常行为规范_ico_02个人日常行为规范_静默安装_03


个人日常行为规范_静默安装_04


个人日常行为规范_静默安装_05


个人日常行为规范_快捷键_06


个人日常行为规范_ico_07


个人日常行为规范_快捷键_08


个人日常行为规范_ico_09


个人日常行为规范_静默安装_10


个人日常行为规范_静默安装_11


个人日常行为规范_ico_12


个人日常行为规范_ico_13


个人日常行为规范_ico_14


个人日常行为规范_静默安装_15


个人日常行为规范_ico_16


个人日常行为规范_静默安装_17


个人日常行为规范_ico_18


个人日常行为规范_静默安装_19


个人日常行为规范_快捷键_20

举报

相关推荐

0 条评论