Jump to content

use photo print wizard


msnf
 Share

Recommended Posts

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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...