Thanks Mark, Would you mind sending on the rest of the script so that I can see the below in context?
Thank you, Mitch Lawrence Lead Applications Analyst Technical Support - NPR/Automation CHRISTUS Information Management *: [EMAIL PROTECTED] Send a "thank you" <http://intranet.christushealth.org/spiritBuck/> to someone! _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albertson, Mark Sent: Thursday, August 30, 2007 4:52 PM To: [email protected] Subject: RE: [Talk] Method to watch a directory for a specific file I have a script that prints to a pdf file for our downtime scripting. You can try changing the Adobe settings to prompt for a filename and don't view the results. Here is my code that sends the pdf filename. Do If StopScript = True Then Exit Sub .Wait 2 Result = .ConnectApp("Save PDF File As") Loop Until Result = True .Wait 5 If fsObj.FolderExists(pstrPath) = True Then .bws.Key pstrPath & "\" & pstrFile & Format(Now, " mm-dd-yyyy hhmm") & ".pdf" .Wait 2 '.bws.Click "Save", False, False .bws.Enter "" .Wait 2 If .Message Then .ScriptKeyEnter "" Else .bws.Click "Cancel", False, False GoTo CleanUp End If _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence, Mitchell Sent: Thursday, August 30, 2007 12:10 PM To: [email protected] Subject: [Talk] Method to watch a directory for a specific file Importance: High Is there a rules-based (or nice polished vba function) method for watching a specific directory for a specific file? I would like to incorporate printing to PDF from Meditech into our scripting capabilities. I can do this by creating a pdf printer driver (we have full adobe) that always prints to a specified directory, specified file. During the creation of a PDF, adobe uses a .tmp file, once the creation of the document is finished, adobe renames the .tmp file to the actual PDF. If I was able to "watch" the output directory for the file, I could then pick that file up and move it to the proper destination/proper name, and then close out the script. So I would also need some way to turn off the timeout in BWS, as each file may take some time to create and would be variable. Anyone have any ideas for these two things? * Watching a directory for a specified file (likely a vba function/subroutine) * Turning off the timeout in BWS? Thank you, Mitch Lawrence Lead Applications Analyst Technical Support - NPR/Automation CHRISTUS Information Management *: [EMAIL PROTECTED] Send a "thank you" <http://intranet.christushealth.org/spiritBuck/> to someone! This transmission is for the use of the individual or entity named on this e-mail. Unauthorized disclosure or access may be prohibited by Public Law 99-474 (The Computer Fraud and Abuse Act of 1986), Public Law 104-294 (National Information Infrastructure Protection Act of 1996), 18 U.S.C. 1030, or other applicable criminal laws, and can result in administrative, disciplinary or criminal proceedings. This mail system, including this transmittal, may be internally monitored for all lawful purposes, including ensuring compliance with applicable privacy and security rules as specified by HIPAA and internal Bert Fish Medical Center policies. Transmission of unencrypted Protected Health Information is prohibited. Please reply to sender or contact Compliance at (386) 424-6470 if you have received this in error.
<<image001.jpg>>
