保存为1.bat, ANSI编码. | < | | @echo off | | cd /d "%~dp0" | | set "batchfile=%~f0" | | Powershell -ExecutionPolicy Bypass -C "Set-Location -LiteralPath ([Environment]::CurrentDirectory);. ([ScriptBlock]::Create([IO.File]::ReadAllText($env:batchfile,[Text.Encoding]::GetEncoding(0) )) )" | | | | exit /b | | | | Add-Type -AssemblyName System.Windows.Forms, Microsoft.VisualBasic | | $proc = Start-Process -FilePath "多功能剪切板.exe" -PassThru | | [Microsoft.VisualBasic.Interaction]::AppActivate($proc.Id) | | | | [System.Windows.Forms.SendKeys]::SendWait("E:\01_项目2024\15_广西2024\03_资料0914") | | [System.Windows.Forms.SendKeys]::SendWait("~{TAB}") | | | | [System.Windows.Forms.SendKeys]::SendWait("E:\22\01_项目2024\15_广西2024\03_资料0914") | | [System.Windows.Forms.SendKeys]::SendWait("~{TAB}") | | | | [System.Windows.Forms.SendKeys]::SendWait("E:\33\中文abc") | | [System.Windows.Forms.SendKeys]::SendWait("~{TAB}") | | | | Start-Sleep -Milliseconds 500 | | [System.Windows.Forms.SendKeys]::SendWait("% n")COPY |
|