Sign in to follow this  
Followers 0
celestialspring

File Save Dialog - no response?

4 posts in this topic

#1 ·  Posted (edited)

Hi Guys,

here is the relevant code:

Func XYZClick()
    $invoicenumber = GUICtrlRead($Invoice_Number)

    $prog = "c:\pdf\pdftk.exe" ; paths with spaces must be enclosed in " quotes "
    $orgfile = "c:\report.pdf"
    $stampfile = "c:\pdf\xyz.pdf"

    $outputfile = FileSaveDialog('"XYZ File Saver"','"\\my server\Emailed Invoices"',".pdf","",$invoicenumber,"")

RunWait("cmd.exe /c" & $prog & " " & $orgfile & " stamp " & $stampfile & " output " & $outputfile, "", @SW_SHOW)

EndFunc   ;==>XYZClick

I can't get the file save dialog to work, what am I doing wrong?

Thanks.

CS

Edited by celestialspring

Share this post


Link to post
Share on other sites



If I'm not wrong your "output" location will have a space in it and that would be enough to screw up the number of parameters. You will have to enclose that between quotes.

RunWait("cmd.exe /c" & $prog & " " & $orgfile & " stamp " & $stampfile & " output """ & $outputfile & """", "", @SW_SHOW)

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

If I'm not wrong your "output" location will have a space in it and that would be enough to screw up the number of parameters. You will have to enclose that between quotes.

RunWait("cmd.exe /c" & $prog & " " & $orgfile & " stamp " & $stampfile & " output """ & $outputfile & """", "", @SW_SHOW)

Thanks, mate. I'll give it a shot.

Share this post


Link to post
Share on other sites

I believe your "*.pdf" parameter needs to be formatted like "PDF FIles (*.pdf)", and all the double-quoting is unnecessary. Try this:

$outputfile = FileSaveDialog("XYZ File Saver","\\my server\Emailed Invoices","PDF FIles (*.pdf)","",$invoicenumber)

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