返回列表 发帖
保存为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)
# Start-Sleep -Milliseconds 1000
[System.Windows.Forms.SendKeys]::SendWait("E:\01_项目2024\15_广西2024\03_资料0914") # F1的快捷路径
[System.Windows.Forms.SendKeys]::SendWait("~{TAB}")
[System.Windows.Forms.SendKeys]::SendWait("E:\22\01_项目2024\15_广西2024\03_资料0914") # F2的快捷路径
[System.Windows.Forms.SendKeys]::SendWait("~{TAB}")
[System.Windows.Forms.SendKeys]::SendWait("E:\33\中文abc") # F3的快捷路径
[System.Windows.Forms.SendKeys]::SendWait("~{TAB}")
Start-Sleep -Milliseconds 500
[System.Windows.Forms.SendKeys]::SendWait("% n")COPY
微信:flashercs
QQ:49908356

TOP

返回列表