收不了各种批量打印软件的功能缺失了,自己ahk写了一个性能上肯定和各种工具比不了,胜在简单
if !(A_IsAdmin || InStr(DllCall("GetCommandLine", "str"), ".exe"" /r"))
Run % "*RunAs " (s:=A_IsCompiled ? "" : A_AhkPath " /r ") """" A_ScriptFullPath """" (s ? "" : " /r")
标题:="批量打印 by hzn"
gui +E0x08000000 +AlwaysOnTop
gui Destroy
gui font, s12, Verdana
gui Add, Text, w-2 h-2 section
For k,v in ["选择打印文件夹","打印脚本目录","重启"]
gui Add, Button, x+5 g%v%,%v%
Gui submit, NoHide
Gui Show,NoActivate w500,%标题%
return
选择打印文件夹:
Thread, NoTimers
FileSelectFolder, dir,C:\Users\Administrator\Desktop\, 3
if ErrorLevel {
MsgBox,4096,报错,文件夹没有选到
ExitApp
}
Thread, NoTimers, false
Loop Files,%dir%\*.*, R ; 递归子文件夹.
{
; MsgBox, 4, , Filename = %A_LoopFileFullPath%`n`nContinue?
; IfMsgBox, No
; break
Run, print %A_LoopFileFullPath%
}
MsgBox,4096,完成,已经打印完成`,点击关闭
Return
打印脚本目录:
Loop Files,, R ; 递归子文件夹.
{
; MsgBox, 4, , Filename = %A_LoopFileFullPath%`n`nContinue?
; IfMsgBox, No
; break
Run, print %A_LoopFileFullPath%
}
MsgBox,4096,完成,已经打印完成`,点击关闭
Return
重启:
Reload
Return
加油,加油
标题应该改为批量打印文件夹目录下的文件,脚本运行了才知道结果