wysocki Posted August 31, 2006 Posted August 31, 2006 I'm trying to write a routine that will open a document in WordPerfect and then print it. Following that, I'll do other things like close WordPerfect, start an Excel print job, and others. The problem is that When I start the print command in WordPerfect, it composes the output while displaying a popup that says "Preparing Document". When that popup goes away, I can then safely proceed to close the app or start printing from other apps. How can I tell when this happens?
exodius Posted August 31, 2006 Posted August 31, 2006 Get the Title of that window using the AutoIt Window Info tool, then look in the helpfile under WinWaitClose...
wysocki Posted August 31, 2006 Author Posted August 31, 2006 Get the Title of that window using the AutoIt Window Info tool, then look in the helpfile under WinWaitClose...Hmmm, it'll be tricky catching it when it pops up, its title bar is greyed so hovering my mouse above it doesn't show anything in the tool. But I'll also have to wait for it to come up in the first place. Here's what I have but it never gets further than the first SplashTextOn message: Run("C:\Program Files\WordPerfect Office 12\Programs\wpwin12.exe c:\apps\sue\document.wpd") WinWaitActive("WordPerfect");main app is loaded Send("^p!g{tab}1-999{enter}");start printing SplashTextOn("WP", "Started") WinWaitActive("WordPerfect 12","Preparing Document") SplashTextOn("WP", "Waiting") WinWaitActive("WordPerfect","Preparing Document") SplashTextOn("WP", "Preparing Document") WinWaitClose("WordPerfect","Preparing Document") SplashOff() Send("!fx") Guess I'd need someone with WordPerfect to try this.
Valuater Posted August 31, 2006 Posted August 31, 2006 maybe.. WinWaitActive("","Preparing Document") 8)
wysocki Posted September 1, 2006 Author Posted September 1, 2006 Nope! This is what I tried, but no luck (all I see is the first splash): Run("C:\Program Files\WordPerfect Office 12\Programs\wpwin12.exe c:\apps\sue\document.wpd") WinWaitActive("WordPerfect");main app is loaded Send("^p!g{tab}1-999{enter}");start printing SplashTextOn("WP", "Started") WinWaitActive("","Preparing Document") SplashTextOn("WP", "Preparing Document") WinWaitClose("","Preparing Document") SplashOff() Send("!fx")
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