Sign in to follow this  
Followers 0
msnf

use photo print wizard

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Maybe this:

#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 by Danyfirex

Share this post


Link to post
Share on other sites

thanks dear Danyfirex

But I want to print all the images together not isolated!

do you have another idea?

Share this post


Link to post
Share on other sites

no more ideas?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0