乱云飞 - 翼展电脑服务中心


aardio操作注册表示例代码

2026-2-6 乱云飞 评论(0) 浏览(48)

import win.ui;
import process.popen;

var winform = win.form(text="启动项管理测试程序";right=400;bottom=300)
winform.add(
    buttonAdd={cls="button";text="添加";left=20;top=20;right=120;bottom=50};
    buttonDel={cls="button";text="删除";left=130;top=20;right=230;bottom=50};
)

var appName = "MyApp";

winform.buttonAdd.oncommand = function() {
    var prcs = process.popen("cmd", '/c reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "' + appName + '" /t REG_SZ /d "' + io._exepath + '" /f', 8);
    prcs.close();
}

winform.buttonDel.oncommand = function() {
    var prcs = process.popen("cmd", '/c reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "' + appName + '" /f', 8);
    prcs.close();
}

winform.show();
win.loopMessage();

命令执行控制台,测试OK

2026-2-5 乱云飞 评论(0) 浏览(36)

import console;
import wsock.tcp.simpleHttpServer;

// 创建服务器
var httpServer = wsock.tcp.simpleHttpServer("0.0.0.0", 8055);

console.setTitle("命令执行服务器 V0.2");
console.log("服务器启动: http://localhost:8055");
console.log("URL直接执行示例: http://localhost:8055/notepad.exe");

/*
每次回复代码请更新版本号!!!
比较完美的版本v0.1
*/

// 请求处理器
httpServer.run(
    function(response, request) {
        // 获取路径
        var path = request.path;
        
        // 路由处理
        if (path == "/" or path == "/index" or path == "/main.aardio") {
            // 返回美化后的主页
            response.headers["Content-Type"] = "text/html; charset=utf-8";
            
            // 构建HTML内容
            var html = '<html>'
            html += '<!DOCTYPE html><html><head><meta charset="utf-8"><title>命令执行控制台</title>'
            html += '<style>'
            html += 'body{font-family:Arial,sans-serif;margin:0;padding:20px;background:#f5f5f5;}'
            html += '.container{max-width:800px;margin:0 auto;background:white;border-radius:0px;box-shadow:0 2px 10px rgba(0,0,0,0.1);overflow:hidden;}'
            html += '.header{background:linear-gradient(90deg,#4a6ee0,#6a4de0);color:white;padding:20px;}'
            html += '.header h1{margin:0;font-size:24px;}'
            html += '.main{padding:20px;}'
            html += '.input-area{display:flex;gap:10px;margin-bottom:15px;}'
            html += '#cmd{flex:1;padding:10px;border:1px solid #ddd;border-radius:0px;font-size:16px;}'
            html += '#runBtn{padding:10px 20px;background:#4a6ee0;color:white;border:none;border-radius:0px;cursor:pointer;font-size:16px;}'
            html += '#runBtn:hover{background:#3a5ed0;}'
            html += '.quick-buttons{margin:10px 0;}'
            html += '.qbtn{padding:5px 10px;margin-right:8px;margin-bottom:8px;background:#e8efff;color:#4a6ee0;border:none;border-radius:0px;cursor:pointer;}'
            html += '.output{background:#1e1e1e;color:#fff;padding:15px;border-radius:0px;margin-top:20px;font-family:Consolas,monospace;min-height:150px;overflow:auto;white-space:pre-wrap;}'
            html += '</style>'
            html += '</head><body>'
            html += '<div class="container">'
            html += '<div class="header"><h1>命令执行控制台</h1><div>端口: 8033</div></div>'
            html += '<div class="main">'
            html += '<div class="input-area">'
            html += '<input type="text" id="cmd" placeholder="输入命令,如: cmd.exe、notepad.exe、dir...">'
            html += '<button id="runBtn" onclick="runCmd()">执行</button>'
            html += '</div>'
            html += '<div class="quick-buttons">'
            html += '<button class="qbtn" onclick="runCmdWithCommand(\'cmd.exe\')">cmd.exe</button>'
            html += '<button class="qbtn" onclick="runCmdWithCommand(\'notepad.exe\')">notepad.exe</button>'
            html += '<button class="qbtn" onclick="runCmdWithCommand(\'calc.exe\')">calc.exe</button>'
            html += '<button class="qbtn" onclick="runCmdWithCommand(\'mspaint.exe\')">mspaint.exe</button>'
            html += '<button class="qbtn" onclick="runCmdWithCommand(\'ipconfig /all\')">ipconfig /all</button>'
            html += '</div>'
            html += '<div class="output" id="out">等待命令...</div>'
            html += '</div></div>'
            html += '<script>'
            html += 'function setCommand(cmd){document.getElementById("cmd").value=cmd;return false;}'
            html += 'async function runCmdWithCommand(cmd){'
            html += 'document.getElementById("cmd").value=cmd;'
            html += 'await runCmd();'
            html += '}'
            html += 'async function runCmd(){'
            html += 'var cmd=document.getElementById("cmd").value;'
            html += 'var out=document.getElementById("out");'
            html += 'if(!cmd){out.textContent="请输入命令";return;}'
            html += 'out.textContent="执行中...";'
            html += 'try{'
            html += 'var r=await fetch("/execute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:cmd})});'
            html += 'var d=await r.json();'
            html += 'if(d.success){out.textContent=d.output||"(无输出)";}else{out.textContent="错误:"+d.output;}'
            html += '}catch(e){out.textContent="请求失败:"+e;}'
            html += '}'
            html += 'document.getElementById("cmd").addEventListener("keypress",function(e){if(e.key==="Enter"){runCmd();}});'
            html += '</script>'
            html += '</body></html>'
            
            response.write(html);
        }
        else if (path == "/execute") {
            // 处理命令执行(保持原始逻辑)
            response.headers["Content-Type"] = "application/json";
            
            if (request.method != "POST") {
                response.write({success=false; output="需要POST请求"});
                return;
            }
            
            // 导入需要的库
            import process.popen;
            import JSON;
            
            // 解析JSON
            var body = request.postJson();
            if (!body or !body.command) {
                response.write({success=false; output="需要命令参数"});
                return;
            }
            
            // 执行命令
            try {
                var cmd = body.command;
                
                // 判断是否是EXE程序(需要显示窗口)
                var cmdLower = string.lower(cmd);
                var isExeProgram = string.find(cmdLower, "%.exe$") 
                    or cmd == "cmd"
                    or string.find(cmdLower, "^notepad")
                    or string.find(cmdLower, "^calc")
                    or string.find(cmdLower, "^mspaint");
                
                if (isExeProgram) {
                    // 对于EXE程序,使用 cmd /c start 来显示窗口
                    var fullCmd = 'cmd /c start "" ' + cmd;
                    var proc = process.popen(fullCmd);
                    if (!proc) {
                        response.write({success=false; output="无法执行命令"});
                        return;
                    }
                    
                    var output = proc.readAll();
                    proc.close();
                    
                    response.write({success=true; output="程序已启动(显示窗口中)"});
                } else {
                    // 对于非EXE命令,使用原版的隐藏窗口方式
                    var proc = process.popen(cmd, null, {flags = 0x08000000});
                    if (!proc) {
                        response.write({success=false; output="无法执行命令"});
                        return;
                    }
                    
                    var output = proc.readAll();
                    proc.close();
                    
                    // 限制输出长度
                    if (#output > 5000) {
                        output = string.left(output, 5000) + "\n... (输出过长)";
                    }
                    
                    response.write({success=true; output=output});
                }
            } catch(e) {
                response.write({success=false; output="执行出错"});
            }
        }
        else if (path == "/status") {
            // 状态页面
            response.headers["Content-Type"] = "application/json";
            response.write({status="运行中", port=8033, time=time()});
        }
        else if (path == "/test") {
            // 测试页面
            response.headers["Content-Type"] = "text/html; charset=utf-8";
            response.write("<h1>测试</h1><p>服务器正常</p>");
        }
        else if (path == "/favicon.ico") {
            // 忽略favicon请求
            response.statusCode = 404;
            response.write("");
        }
        else {
            // 处理通过URL直接执行的命令
            // 去除开头的斜杠
            var cmd = string.right(path, #path - 1);
            if (!cmd or cmd == "") {
                response.statusCode = 404;
                response.write("404 - 未找到: " + path);
                return;
            }
            
            // 执行命令(复用原有执行逻辑)
            try {
                response.headers["Content-Type"] = "application/json";
                
                // 判断是否是EXE程序(需要显示窗口)
                var cmdLower = string.lower(cmd);
                var isExeProgram = string.find(cmdLower, "%.exe$") 
                    or cmd == "cmd"
                    or string.find(cmdLower, "^notepad")
                    or string.find(cmdLower, "^calc")
                    or string.find(cmdLower, "^mspaint");
                
                if (isExeProgram) {
                    // 对于EXE程序,使用 cmd /c start 来显示窗口
                    var fullCmd = 'cmd /c start "" ' + cmd;
                    console.log("URL执行(显示窗口): " + fullCmd);
                    
                    var proc = process.popen(fullCmd);
                    if (!proc) {
                        response.write({success=false; output="无法执行命令"});
                        return;
                    }
                    
                    var output = proc.readAll();
                    proc.close();
                    
                    response.write({success=true; output="程序已启动(显示窗口中)", command=cmd});
                } else {
                    // 对于非EXE命令,使用原版的隐藏窗口方式
                    console.log("URL执行(隐藏窗口): " + cmd);
                    
                    var proc = process.popen(cmd, null, {flags = 0x08000000});
                    if (!proc) {
                        response.write({success=false; output="无法执行命令"});
                        return;
                    }
                    
                    var output = proc.readAll();
                    proc.close();
                    
                    // 限制输出长度
                    if (#output > 5000) {
                        output = string.left(output, 5000) + "\n... (输出过长)";
                    }
                    
                    response.write({success=true; output=output, command=cmd});
                }
            } catch(e) {
                console.log("URL执行出错: ", e);
                response.headers["Content-Type"] = "application/json";
                response.write({success=false; output="执行出错: " + tostring(e), command=cmd});
            }
        }
    }
);

console.pause();

WPS Office 2019 ProPlus 11.8.2.8621 专业增强政府版

2026-1-25 乱云飞 评论(0) 浏览(855)

WPS Office 2019 ProPlus 是中国政府应用最广泛的办公软件之一,在国家新闻出版总署、外交部、工业与信息化部、科技部等70多家部委、办、局级中央政府单位中被广泛采购和应用,在国内所有省级政府办公软件的采购中,WPS Office占据总采购量近三分之二的市场份额,居国内、外办公软件厂商采购首位。WPS Office在企业中应用也极其广泛,如中国工商银行、中国石油天然气集团公司、国家电网公司、鞍钢集团公司、中国核工业集团公司等,目前已实现在金融、电力、钢铁、能源等国家重点和骨干行业中全面领跑的局面。

WPS Office 2019WPS Office 2019WPS Office 2019

WPS Office 2019 政府版优势

大家众所周知的一个问题就是免费软件有很多烦人的弹窗广告,WPS Office 2019 ProPlus专业增强政府版在于没有任何的广告,让你在办公的时候安安静静的做事。

版本说明

此版基于官方试用版制作,内置地方政府正版激活码一枚,安装完后自动激活;

基于某市政府授权版制作

剔除OEM广告信息

保留政府版授权KEY

PS:计算机的 WPS 云文档和右键菜单看图设置(通知栏 WPS 云右键—设置)

正版激活序列号

9DP6T-9AGWG-KWV33-9MPC8-JDCVF
THUV2-32HH7-6NMHN-PTX7Y-QQCTH

R7AKQ-KLBXV-RNX3F-BPACQ-NQDGE
R7AKQ-KLBXV-RNX3F-BPACQ-NQDGE

694BF-YUDBG-EAR69-BPRGB-ATQXH
7L83X-REUF8-7BYWB-G28RV-UPAYK

关于启动提示XXX政府机关版

如果你不希望启动提示XXX政府版找到WPS所在目录,向上一级页面删除oem目录即可

下载地址

诚通网盘:https://YPOJIE.pipipan.com/dir/17401394-32188935-7a28c6/

百度网盘:https://pan.baidu.com/s/12B2H8Dur9b957M_G3DoBKQ 提取码: unwp

大庆市党政机关专用版

http://wpspro.support.wps.cn/gov/heilongjiang/daqing/installation/WPS_Office_2019_%E5%A4%A7%E5%BA%86%E5%B8%82%E5%85%9A%E6%94%BF%E6%9C%BA%E5%85%B3%E4%B8%93%E7%94%A8%E7%89%88.exe

http://wpspro.support.wps.cn/gov/guangdong/huizhou/

https://htcui.com/23703.html





WPS政府专用版跟WPS Office专业版有什么区别?

– 政府版内置序列号,无需激活,企业定制授权长期有效!
– 政府版安装包具备专业增强版组件和政府OEM信息标识

WPS政府专用版本下载地址集合

广东省直机关版wps2016专业版
官网:yzy.gdzwfw.gov.cn/downl

WPS2013大祥区政府机关版(带授权书序列码)
官网:gl.dxzc.gov.cn/Item/211
直连:WPS2013大祥区政府机关版

WPS Office 2016 文山州党政机关专用版
官网:ynwss.gov.cn/info/2463/
直连:WPS Office 2016 文山州党政机关专用版

辽宁省财政厅wps office 2016 (10.1.0.5866)此版本未集成激活码,需自行输入激活码
官网:czt.ln.gov.cn/czt/wsfw/
直连:W.P.S.5866.19.552.zip

杭州市机关事务局wps 2016 增强版
官网:jgj.hangzhou.gov.cn/art
直连:WPS软件包.zip

石家庄人力资源保障局wps office 2019(11.8.2.8411) 支持云文档,极小安装包(推荐)
官网:rsj.sjz.gov.cn/col/1515
直连:WPS2019版安装包(政府机关)
直链:WPS2019版安装包(事业单位)

大庆市党政机关版2019
官网:daqing.gov.cn/xiangguan
直连:WPS_Office2019大庆市党政机关专用版

1.WPS2013大祥区政府机关版(带授权书序列码)
官网:http://gl.dxzc.gov.cn/Item/21126.aspx
直连:http://gl.dxzc.gov.cn/Common/ShowDownloadUrl.aspx?urlid=0&id=21126

2.WPS Office 2016 文山州党政机关专用版
官网:http://www.ynwss.gov.cn/info/2463/79099.htm
直连:WPS Office 2016 文山州党政机关专用版

3.辽宁省财政厅wps office 2016 (10.1.0.5866)此版本未集成激活码,需自行输入激活码
官网:https://czt.ln.gov.cn/czt/wsfw/xzzq/rjxz/04916B65FCDD48ACB6BEA66FBAD1B1B3/index.shtml
直连:https://czt.ln.gov.cn/czt/wsfw/xzzq/rjxz/04916B65FCDD48ACB6BEA66FBAD1B1B3/P020160831485684303745.zip

4. 2016云南党政机关专用版
蓝奏云地址:https://liusoon.lanzouv.com/ikPYk0he0v0d

5.杭州市机关事务局wps 2016 增强版
官网:https://jgj.hangzhou.gov.cn/art/2022/9/5/art_1692393_58901666.html
直连:https://jgj.hangzhou.gov.cn/module/download/downfile.jsp?classid=0&filename=c8fce3a90d6b4fa3b744a958a43821cf.zip

6.珠海市政府专业版wps2016
蓝奏云:https://liusoon.lanzouv.com/iKDbY0hdxx5c 密码:fy0v

7.广东省直机关版wps2016专业版
官网:https://yzy.gdzwfw.gov.cn/download.html
直连:https://xtbg.gdzwfw.gov.cn/wpspkg/wpsupdate/prd-gdzwfw-pc-wps.exe

8.石家庄人力资源保障局wps office 2019(11.8.2.8411)  支持云文档,极小安装包(推荐)
官网:https://rsj.sjz.gov.cn/col/1515395624617/2019/06/10/1560135309935.html
直连:wps office 2019政府机关版

9.大庆市党政机关版2019
官网:http://www.daqing.gov.cn/xiangguanxiazai/14436.html
直连:WPS_Office2019大庆市党政机关专用版

10.广东省直机关版(wps 2019 网址内含多个版本)
官网:数字广东省直单位WPS Office软件下载网站 (gdzwfw.gov.cn)

注:目前广东版本的无法使用云文档,其余功能正常,大庆和石家庄版本的功能正常可登录。

弹出窗口,与屏幕右下角对齐,不遮挡任务栏。

2025-12-18 乱云飞 评论(0) 浏览(41)

#NoEnv
#SingleInstance Force
 
; 标题栏高度 ; 任务栏高度
CaptionHeight := DllCall("user32\GetSystemMetrics", "Int", 4)
WinGetPos,,,,TaskbarHeight,ahk_class Shell_TrayWnd
 
; 使用简单的固定坐标
WinW := 500
WinH := 300
WinX := A_ScreenWidth - WinW -4
WinY := A_ScreenHeight - WinH - TaskbarHeight - CaptionHeight -4
 
Gui, New
Gui, Show, x%WinX% y%WinY% w%WinW% h%WinH%
Gui, Color, FFFFFF
Return
 
GuiClose:
ExitApp

获取机器码

2025-12-17 乱云飞 评论(0) 浏览(46)

;------------------------------------------------------------------
;获取机器码函数 V20251219 TEST_OK
Run, getid.dll,,hide 				;获取机器码
WinWait, Hardware ID,, 5 			;等待对话框
Sleep, 3000					;等待3000ms
WinGet, hwnd, ID, Hardware ID			;用标题获取句柄
WinGet, hwnd, ID, ahk_exe getid.dll		;用进程获取句柄
ControlClick, Button1, ahk_exe getid.dll 	;模拟点击按钮
ControlClick, Button1, ahk_id %hwnd% 		;模拟点击按钮
ControlSend, , {Enter}, ahk_exe getid.dll	;模拟发送ENTER
ControlSend, , {Enter}, ahk_id %hwnd%		;模拟发送ENTER
PostMessage, 0x201, 0, 0, Button1, ahk_id %hwnd%;模拟鼠标按下
Sleep, 66					;等待66ms
PostMessage, 0x202, 0, 0, Button1, ahk_id %hwnd%;模拟鼠标抬起
Sleep, 666					;等待666ms
Run,taskkill /f /im getid.dll,,Hide 		;关闭机器码进程
Run,http://80c.cc/zc/?%Clipboard%	 	;提交机器码
;------------------------------------------------------------------

海康威视监控摄像头网页直播

2025-12-14 乱云飞 监控 评论(0) 浏览(86) 标签: 海康威视 监控摄像头 网页直播

软件下载:http://80c.cc
Aliplayer Online Settings

虚拟摄像头配置文件ONVIF.INI

2025-12-10 乱云飞 代码 评论(0) 浏览(122) 标签: onvif 虚拟监控 配置文件

<?xml version="1.0" encoding="utf-8"?>
<!----------vx:13213610060 QQ:5082500---------->
<!----------VirtualCamera v20251210-a---------->
<config>
  <!---------- 基本服务设置 ---------->
  <server_ip>192.168.1.27</server_ip>
  <http_enable>1</http_enable>
  <http_port>8100</http_port>
  <https_enable>0</https_enable>
  <need_auth>0</need_auth>
  <log_enable>0</log_enable>
  <log_level>0</log_level>
  <!---------- 设备信息配置 ---------->
  <information>
    <Manufacturer>EZSOFT</Manufacturer>
    <Model>VirtualCamera</Model>
    <FirmwareVersion>VX13213610060</FirmwareVersion>
    <SerialNumber>QQ5082500</SerialNumber>
    <HardwareId>80c.cc</HardwareId>
  </information>
  <!---------- 用户配置 ---------->
  <user>
    <username>admin</username>
    <password>admin</password>
    <userlevel>Administrator</userlevel>
  </user>
  <!---------- 主码流配置 ---------->
  <profile token="MainStream"fixed="true">
    <Name>MainStream</Name>
    <stream_uri>rtsp://192.168.1.27:8554/screenlive</stream_uri>
    <VideoSourceConfiguration token="VideoSourceConfigurationToken_1">
    </VideoSourceConfiguration>
    <VideoEncoderConfiguration token="VideoEncoderConfigurationToken_1">
    </VideoEncoderConfiguration>
  </profile>
  <!---------- 子码流配置 ---------->
  <profile token="SubStream"fixed="true">
    <Name>SubStream</Name>
    <stream_uri>rtsp://192.168.1.27:8554/substream</stream_uri>
    <VideoSourceConfiguration token="VideoSourceConfigurationToken_1">
    </VideoSourceConfiguration>
    <VideoEncoderConfiguration token="VideoEncoderConfigurationToken_2">
    </VideoEncoderConfiguration>
  </profile>
  <!---------- 物理视频源定义 ---------->
  <VideoSources token="VideoSourceToken_1">
    <Framerate>25.0</Framerate>
    <Resolution>
      <Width>1920</Width>
      <Height>1080</Height>
    </Resolution>
    <VideoSourceModes token="Mode1"Enabled="true">
      <MaxFramerate>30</MaxFramerate>
      <MaxResolution>
        <Width>1920</Width>
        <Height>1080</Height>
      </MaxResolution>
      <Encodings>H264</Encodings>
    </VideoSourceModes>
  </VideoSources>
  <!---------- 视频源使用配置 ---------->
  <VideoSourceConfigurations token="VideoSourceConfigurationToken_1">
    <Name>VideoSourceConfiguration</Name>
    <UseCount>1</UseCount>
    <SourceToken>VideoSourceToken_1</SourceToken>
    <Bounds x="0"y="0"width="1920"height="1080" />
  </VideoSourceConfigurations>
  <!---------- 主码流编码配置 ---------->
  <VideoEncoderConfigurations token="VideoEncoderConfigurationToken_1"GovLength="25"Profile="Main">
    <Name>MainStream</Name>
    <UseCount>1</UseCount>
    <Encoding>H264</Encoding>
    <Resolution>
      <Width>1920</Width>
      <Height>1080</Height>
    </Resolution>
  </VideoEncoderConfigurations>
  <!---------- 子码流编码配置 ---------->
  <VideoEncoderConfigurations token="VideoEncoderConfigurationToken_2"GovLength="25"Profile="Main">
    <Name>SubStream</Name>
    <UseCount>1</UseCount>
    <Encoding>H264</Encoding>
    <Resolution>
      <Width>480</Width>
      <Height>360</Height>
    </Resolution>
  </VideoEncoderConfigurations>
  <!---------- OSD配置 ---------->
  <OSDConfigurations token="OSD1">
    <VideoSourceConfigurationToken>VideoSourceConfigurationToken_1</VideoSourceConfigurationToken>
    <Type>Text</Type>
    <Position>
      <Type>UpperLeft</Type>
    </Position>
    <TextString>
      <Type>Plain</Type>
      <PlainText>IPCamera01</PlainText>
    </TextString>
  </OSDConfigurations>
  <!---------- 设备发现范围 ---------->
  <scope>onvif://www.onvif.org/location/country/CHINA</scope>
  <scope>onvif://www.onvif.org/MAC/A1:32:13:61:00:60</scope>
  <scope>onvif://www.onvif.org/hardware/Hi3516CV610</scope>
  <scope>onvif://www.onvif.org/name/IPCamera</scope>
  <scope>onvif://www.onvif.org/profile/T</scope>
  <event>
    <renew_interval>60</renew_interval>
    <simulate_enable>1</simulate_enable>
  </event>
</config>

向字符叠加器发送数据的命令

2025-10-26 乱云飞 评论(0) 浏览(76)

改为英文输入法,只需要运行一次。
powershell -Command "Set-WinUserLanguageList -LanguageList en-US -Force"

发送数据:
powershell -Command "Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait('苏A-188{U}8{ENTER}')"

生成OSD文字

2025-10-22 乱云飞 评论(0) 浏览(86)

#NoEnv
#SingleInstance Force
SendMode Input
SetWorkingDir, %A_ScriptDir%

; 检查magick.exe是否存在
IfNotExist, magick.exe
{
    MsgBox, 16, 错误, 在同目录下未找到 magick.exe!`n请将 magick.exe 放在脚本同一目录中。
    ExitApp
}

; 创建GUI界面
Gui, Font, s10, Microsoft YaHei
Gui, Add, GroupBox, x10 y10 w380 h60, 图片设置
Gui, Add, Text, x20 y35 w40, 宽度:
Gui, Add, Edit, x60 y32 w60 vImageWidth, 1920
Gui, Add, Text, x130 y35 w40, 高度:
Gui, Add, Edit, x170 y32 w60 vImageHeight, 1080
Gui, Add, Text, x240 y35 w40, 背景:
Gui, Add, DropDownList, x280 y32 w100 vBackground, transparent||white|black|red|green|blue

Gui, Add, GroupBox, x10 y80 w380 h120, 文字设置
Gui, Add, Text, x20 y105 w40, 内容:
Gui, Add, Edit, x60 y102 w320 vTextContent, 测试OK

Gui, Add, Text, x20 y135 w40, X坐标:
Gui, Add, Edit, x60 y132 w60 vPosX, 100
Gui, Add, Text, x130 y135 w40, Y坐标:
Gui, Add, Edit, x170 y132 w60 vPosY, 100
Gui, Add, Text, x240 y135 w40, 字号:
Gui, Add, Edit, x280 y132 w100 vFontSize, 32

Gui, Add, Text, x20 y165 w40, 字体:
Gui, Add, DropDownList, x60 y162 w170 vFontName, 监控专用||微软雅黑|宋体|黑体|楷体|仿宋
Gui, Add, Text, x240 y165 w40, 颜色:
Gui, Add, DropDownList, x280 y162 w100 vTextColor, red||white|black|blue|purple|green|yellow|orange|pink|brown|gray|cyan|magenta

Gui, Add, GroupBox, x10 y210 w380 h60, 输出设置
Gui, Add, Text, x20 y240 w50, 文件名:
Gui, Add, Edit, x70 y237 w210 vOutputFile, 1.png
Gui, Add, Button, x290 y237 w90 gBrowseFile, 浏览...

Gui, Add, Button, x80 y280 w100 h35 gGenerateImage, 生成图片
Gui, Add, Button, x200 y280 w100 h35 gResetSettings, 重置设置
Gui, Add, StatusBar,, 就绪 - 点击"生成图片"开始创建

Gui, Show, w400 h360, OSD生成器
SB_SetText("就绪 - 点击""生成图片""开始创建")
return

; 浏览文件按钮
BrowseFile:
    FileSelectFile, SelectedFile, S16, 1.png, 选择输出文件, 图片文件 (*.png;*.jpg;*.gif;*.bmp)
    if (SelectedFile != "")
    {
        GuiControl,, OutputFile, %SelectedFile%
    }
return

; 生成图片按钮
GenerateImage:
    Gui, Submit, NoHide
    
    ; 检查必要字段
    if (ImageWidth = "" || ImageHeight = "" || TextContent = "" || OutputFile = "")
    {
        SB_SetText("错误:请填写所有必要字段")
        MsgBox, 48, 错误, 请填写所有必要字段!
        return
    }
    
    ; 验证数字输入
    if ImageWidth is not integer
    {
        MsgBox, 48, 错误, 宽度必须是整数!
        return
    }
    if ImageHeight is not integer
    {
        MsgBox, 48, 错误, 高度必须是整数!
        return
    }
    if PosX is not integer
    {
        MsgBox, 48, 错误, X坐标必须是整数!
        return
    }
    if PosY is not integer
    {
        MsgBox, 48, 错误, Y坐标必须是整数!
        return
    }
    if FontSize is not integer
    {
        MsgBox, 48, 错误, 字号必须是整数!
        return
    }
    
    SB_SetText("正在生成图片...")
    
    ; 获取实际字体名称
    ActualFont := GetActualFont(FontName)
    
    ; 构建ImageMagick命令 - 使用相对路径
    MagickCommand := "magick.exe -size " ImageWidth "x" ImageHeight " xc:" Background 
    MagickCommand .= " -font """ ActualFont """"
    MagickCommand .= " -pointsize " FontSize
    MagickCommand .= " -fill " TextColor
    MagickCommand .= " -gravity northwest"
    MagickCommand .= " -annotate +" PosX "+" PosY " """ TextContent """"
    MagickCommand .= " """ OutputFile """"
    
    ; 显示执行的命令(调试用)
    ; MsgBox, % MagickCommand
    
    ; 执行命令
    RunWait, %ComSpec% /c "%MagickCommand%", , Hide, ProcessID
    
    ; 检查是否生成成功
    if FileExist(OutputFile)
    {
        FileGetSize, FileSize, %OutputFile%
        if (FileSize > 0)
        {
            SB_SetText("图片生成成功: " OutputFile)
            MsgBox, 64, 成功, 图片已成功生成!`n`n文件:%OutputFile%`n尺寸:%ImageWidth%x%ImageHeight%`n文字:%TextContent%
            
            ; 询问是否打开图片
            MsgBox, 36, 打开图片, 是否要打开生成的图片?
            IfMsgBox, Yes
            {
                Run, %OutputFile%
            }
        }
        else
        {
            SB_SetText("图片生成失败 - 文件大小为0")
            MsgBox, 16, 错误, 图片生成失败!`n生成的文件大小为0。`n请检查参数设置。
            FileDelete, %OutputFile%
        }
    }
    else
    {
        SB_SetText("图片生成失败")
        MsgBox, 16, 错误, 图片生成失败!`n请检查:`n1. 文字内容是否包含特殊字符`n2. 字体是否可用`n3. 颜色格式是否正确
    }
return

; 获取实际字体名称函数
GetActualFont(FontName)
{
    ; 字体名称映射
    if (FontName = "监控专用")
        return "jkfont.ttf"  ; 直接使用相对路径
    else if (FontName = "宋体")
        return "SimSun-&-NSimSun"
    else if (FontName = "黑体")
        return "SimHei"
    else if (FontName = "楷体")
        return "KaiTi"
    else if (FontName = "仿宋")
        return "FangSong"
    else if (FontName = "微软雅黑")
        return "Microsoft-YaHei-&-Microsoft-YaHei-UI"
    else
        return FontName
}

; 重置设置按钮
ResetSettings:
    GuiControl,, ImageWidth, 1920
    GuiControl,, ImageHeight, 1080
    GuiControl, ChooseString, Background, transparent
    GuiControl,, TextContent, 测试OK
    GuiControl, ChooseString, FontName, 监控专用
    GuiControl,, FontSize, 32
    GuiControl,, PosX, 100
    GuiControl,, PosY, 100
    GuiControl, ChooseString, TextColor, red
    GuiControl,, OutputFile, 1.png
    SB_SetText("设置已重置")
return

; GUI关闭
GuiClose:
GuiEscape:
    ExitApp

#301重定向规则备份

2025-10-8 乱云飞 评论(0) 浏览(84)

#301重定向规则备份
RewriteCond %{THE_REQUEST} \s/(?!onvif_20251008c\.exe)(onvif_[^\s]*\.(exe|zip|7z|rar))(\?[^\s]*)?\s [NC]
RewriteRule ^ /onvif_20251008c.exe [R=301,L]
预ICP备10086-001号 © 翼展网/80C.CC 技术支持/洛阳翼展科技
TEL / 13213610060 QQ / 345794501
Powered by emlog