I have a program P1 which puts up a large number of user action buttons to print out various reports. Each button actions an appropriate print program (chainprog) P2,P3 etc etc
call yield_program_control@(y_temporarily)
istart95 = START_PROCESS@(chainprog, ' ')
call yield_program_control@(y_temporarily)
In the chainprog almost the first thing done is to open_printer:
call yield_program_control@(y_temporarily)
wwww=open_printer@(idprnt)
call yield_program_control@(y_temporarily)
print*, wwww
This has worked fine for dozens of printers - real and Microsoft XPS / and various PDF utilities for many years - until Microsoft Print to PDF arrived!!
What happens with this printer is that as soon as P2 is entered the expected printer dialogue box is displayed and you then press print then the P2 process immediately becomes a background task and thus P1 just hangs. The print*, www in the above code is not actioned in this scenario.
HOWEVER if you wait 5 seconds with the Printer Dialogue box displayed and then press Print all works fine!
I can obviously use START_PPROCESS or START_PROCESS_AND_WAIT@ (both of which work in the normal manner one would expect) but then I will have to incorporate either messaging or file creation/deletion in over 20 programs to ensure P2 etc etc has finished before other printouts are selected.
Not really possible to turn this into a trivial example I'm afraid but any ideas would be most gratefully received.
Thanks
Bill