|
楼主 |
发表于 2014-12-1 01:13:56
|
显示全部楼层
用最简单的方法做出来了,大家号还有没有其他方法, 比如直接调用dll能否实现,
Func _print()
$sTemp = @TempDir & "\print.txt"
;FileWrite($sTemp, GUICtrlRead(GUICtrlRead($ListView1)))
$iIndex = GUICtrlRead($ListView1)
$sItemText = GUICtrlRead($iIndex)
$aItemText = StringSplit($sItemText, '|')
FileWrite($sTemp,"资产条码:"&$aItemText[2] & @CRLF)
FileWrite($sTemp,"运单号(客户):"&$aItemText[3] & @CRLF)
FileWrite($sTemp,"寄送人:"&$aItemText[4] & @CRLF)
FileWrite($sTemp,"联系方式:"&$aItemText[5] & @CRLF)
FileWrite($sTemp,"设备类型:"&$aItemText[6] & @CRLF)
FileWrite($sTemp,"送修原因:"&$aItemText[7] & @CRLF)
FileWrite($sTemp,"开机帐号:"&$aItemText[8] & @CRLF)
FileWrite($sTemp,"开机密码:"&$aItemText[9] & @CRLF)
FileWrite($sTemp,"接收人:"&$aItemText[10] & @CRLF)
FileWrite($sTemp,"维护人:"&$aItemText[11] & @CRLF)
FileWrite($sTemp,"维修结论:"&$aItemText[12] & @CRLF)
FileWrite($sTemp,"寄送人(it):"&$aItemText[13] & @CRLF)
FileWrite($sTemp,"运单号(it):"&$aItemText[14] & @CRLF)
FileWrite($sTemp,"电脑相关信息::"&$aItemText[15] & @CRLF)
ShellExecuteWait($sTemp, "", "", "Print", @SW_Hide)
;Sleep(5000)
; FileDelete($sTemp)
EndFunc |
|