msnf Posted January 18, 2014 Share 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? Link to comment Share on other sites More sharing options...
Danyfirex Posted January 18, 2014 Share 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 Link to comment Share on other sites More sharing options...
msnf Posted January 18, 2014 Author Share Posted January 18, 2014 thanks dear Danyfirex But I want to print all the images together not isolated! do you have another idea? Link to comment Share on other sites More sharing options...
msnf Posted January 20, 2014 Author Share Posted January 20, 2014 no more ideas? Link to comment Share on other sites More sharing options...
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