forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

START_PROCESS / PPROCESS

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
BILLDOWS



Joined: 22 Jul 2005
Posts: 83
Location: Swansea, UK

PostPosted: Tue Nov 29, 2016 12:50 pm    Post subject: START_PROCESS / PPROCESS Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 4867
Location: Salford, UK

PostPosted: Tue Nov 29, 2016 4:15 pm    Post subject: Reply with quote

Bill

I would try commenting out some or perhaps all of the calls to yield_program_control@. They may not be helping in this context.
Back to top
View user's profile Send private message
BILLDOWS



Joined: 22 Jul 2005
Posts: 83
Location: Swansea, UK

PostPosted: Tue Nov 29, 2016 5:04 pm    Post subject: Reply with quote

Thanks Paul - Initial attempt doing this gave no change - will continue trying but unless others have ideas I think it will eventually be up to START_PPROCESS and messaging / files. Really cannot understand why given the print dialogue comes up quickly as expected and accepts the Print action why the program seems to get lost. (if you select (immediately) NOT to print at this dialogue normal actions resume immediately).

Also, even if you pre-define the printer and use open_printer1 (for the MS PDF printer - and only with this printer) then the same problem occurs.

Many Thanks again

Bill
Back to top
View user's profile Send private message Visit poster's website
BILLDOWS



Joined: 22 Jul 2005
Posts: 83
Location: Swansea, UK

PostPosted: Wed Dec 07, 2016 7:40 am    Post subject: Reply with quote

A Google search reveals that others have experienced this problem on this particular printer (MS Print to PDF). The solution from a Silverfrost perspective is to use START_PROCESS_AND_WAIT@ which does allow this 'printer' - this inserts additional yield_process calls whilst the called process is executing.

Thanks to all who looked at this post

Bill
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group