以下是网上搜索到的,第二段代码经测试不成功,第一段代码找不到那个函数
[au3]_OpenFilePrint("C:\test.gif")
Func _OpenFilePrint ($sFilePath)
Local $oShellApp = ObjCreate('shell.application')
Local $sPath = StringRegExpReplace($sFilePath, "\\[^\\]+$", "")
If @extended =0 Then $sPath = @WorkingDir
Local $oPath = $oShellApp.Namespace ($sPath), $oItem
For $oItem In $oPath.items
If $oItem.Path = $sFilePath Then
ConsoleWrite($oItem.Path &@CRLF)
$oItem.InvokeVerb('&Print')
EndIf
Next
EndFunc ; => _OpenFilePrint.[/au3]
[au3]$sPrintFile = "c:\image.png"
Run('Rundll32.exe "' & @SystemDir & '\mshtml.dll",PrintHTML "' & $sPrintFile & '"', @SystemDir)[/au3]
[ 本帖最后由 zeebit 于 2008-9-7 20:02 编辑 ] |