msnf Posted January 18, 2014 Posted January 18, 2014 Hello all I used this code for printing my pics but when use "$FD_MULTISELECT" , program show error #include <File.au3> #include <MsgBoxConstants.au3> Local $sFilePath = FileOpenDialog("page", "p1\" , "pic(*.jpg)", $FD_FILEMUSTEXIST + $FD_MULTISELECT) If @error Then Exit $sprint = StringReplace($sFilePath, "print|", "print\") $sprinto = StringReplace($sprint, "|", "&") Local $iIsPrinted = _FilePrint($sprinto) If $iIsPrinted Then MsgBox($MB_SYSTEMMODAL, "", "ok") Else MsgBox($MB_SYSTEMMODAL, "", "Error: " & @error & @CRLF & "error") EndIf Can you help me?
Danyfirex Posted January 18, 2014 Posted January 18, 2014 (edited) Maybe this: expandcollapse popup#include <File.au3> #include <MsgBoxConstants.au3> Local $sFilePath = FileOpenDialog("page", "p1\", "pic(*.jpg)", $FD_FILEMUSTEXIST + $FD_MULTISELECT) If @error Then Exit $aFiles = StringSplit($sFilePath, "|") _ArrayDisplay($aFiles) Local $iIsPrinted = 0 Local $FiletoPrint = "" For $i = 2 To $aFiles[0] ConsoleWrite("File " & $i - 1 & " = " & $aFiles[1] & "\" & $aFiles[$i] & @CRLF) $FiletoPrint = $aFiles[1] & "\" & $aFiles[$i] $iIsPrinted= _FilePrint($FiletoPrint) If $iIsPrinted Then MsgBox($MB_SYSTEMMODAL, "", "ok") Else MsgBox($MB_SYSTEMMODAL, "", "Error: " & @error & @CRLF & "error") EndIf Next saludos Edited January 18, 2014 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
msnf Posted January 18, 2014 Author Posted January 18, 2014 thanks dear Danyfirex But I want to print all the images together not isolated! do you have another idea?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now