celestialspring Posted August 4, 2010 Posted August 4, 2010 (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 August 4, 2010 by celestialspring
enaiman Posted August 4, 2010 Posted August 4, 2010 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 :)
celestialspring Posted August 21, 2010 Author Posted August 21, 2010 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.
Spiff59 Posted August 21, 2010 Posted August 21, 2010 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)
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