Jump to content

Process system modal print dialog


Recommended Posts

We are trying to automate some printing tasks for an application that we do not control.  When the "Save Print Output As" dialog appears, it is system modal.  The user cannot click to the desktop or activate any other windows.  Our script also stops at this point.  Is there anyway to handle this type of dialog?  I am guessing not, but wanted to get confirmation.

Thank you

Link to comment
Share on other sites

  • Developers

Just add an adlib function which checks for the window and act on it when it appears.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Have you checked with au3info what the exact text is for the window or visible text in the window to ensure it is correct?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

My progress bar shows my AdlibRegister() function being accessed, and I send keystrokes to the active window, but nothing happens.  I have tried moving the mouse to where the buttons are and sending a mouse click, pressing escape, and sending text, but no automated activity seems to be making it to the print dialog.  This is a .NET application, so that may be part of the issue?

Link to comment
Share on other sites

  • Developers

Is the print dialog running with Admin mode and have your tried running the script as Adminitrator?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

For modal clicks, I send the controlclick as another process...Like this from the helpfile:

Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(4096, ''Hello World!'', ''Hi!'')"')

Then that new process get's deadlocked while your script proceeds.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Thank you for the suggestion, but running automation through a new process does not work either.  I can see that the script continues through a progress display and logging to a file, but no screen actions or Send() commands appear to work.  If I create a top most dialog it still appears behind the print dialog until I manually close the print dialog.  I am thinking this all may be due to running via remote desktop, but am not sure yet

Edited by HudsonKane
Link to comment
Share on other sites

  • 2 weeks later...

To finish this thread off...

The remote desktop session was not allowed to use printing resources on that PC (windows 2008 server), it was only allowed to access Local printing resources.

The two pc's do have access to the same mapped network location so..

To overcome this we created 2 scripts.

Process #1
on the main pc we have a listener that waits for the "print save output as" dialog, it then gets the desired file name from a flag file created by process #2
then writes out a "process complete" flag file

Process #2
performs all the processing to get to the item to print, writes our a flag file with the desired file name, and calls up the print dialog
waits until a "process complete" flag file exists, then removes it and carries on

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...