Jump to content

Recommended Posts

Posted

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

Posted

Thank you.  I have set this up, and I can see the function being called by updating the display in a ProgressSet() call however my

if WinExists("Save Print Output As") Then

check never returns true.  I will continue to investigate and post back anything I find

Posted

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?

Posted

neither is run as admin, the process is being run via remote desktop and we currently do not have access to admin rights.  I will try to get this access and try again.

Thank you

Posted (edited)

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.
Posted (edited)

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
  • 2 weeks later...
Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...