I had the problem that I needed a way to print an image from AutoIt.
I searched the Forum, and only fount the print.au3 UDF, which seems to be only able to print text (didn't test it, but was said so in the topic).
I found a Rundll32 call which is able to print images with the Windows Image and Fax Viewer. I made a function to print the image the a specified printer.
Func _PrintImage($filename, $printer) If Not FileExists($filename) Then SetError(1, "Specified file couldn't be found") Return(0) EndIf $command = "RunDLL32.EXE shimgvw.dll,ImageView_PrintTo /pt " & $filename & " " & $printer Run($command) EndFunc
I am sure it could be done with DllCall but I don't know where to start cause in MSDN i only found the RunDll32 call to use this function.
Maybe there is also a way to check if the specified printer is available, but also i didn't find out in the hurry how.
Hope you find it useful, and maybe someone can modify it to a DllCall Function.
Greetz Raindancer




