Page 1 of 1
Why this problem
Posted: Sat Jul 07, 2007 2:49 am
by dalkin
Using this script on a "Print" button causes the printing to hang, forcing a force quit of Revolution. There's an endless loop somewhere but I can't find it. Rev 2.8.1 on Mac OSX 10.4.10.
If I take out the 2nd line, "open printing with dialog", it works fine but goes straight to the last selected printer, removing the page setup and number of copies function of a normal printing dialog.
Any help appreciated.
on mouseUp
open printing with dialog
hide button "Print"
hide button "Next Screen"
hide button "Previous Screen"
hide button "Main Screen"
hide button "Ideas"
set the printScale to .6
print this card
show button "Print"
show button "Next Screen"
show button "Previous Screen"
show button "Main Screen"
show button "Ideas"
end mouseUp
Posted: Sat Jul 07, 2007 3:49 am
by Lynn P.
Hi dalkin~
Try changing the order of your "open print with dialog" call. Set up all the formatting or hiding of objects prior to calling any print routine that interacts with the print driver.
Code: Select all
on mouseUp
hide button "Print"
hide button "Next Screen"
hide button "Previous Screen"
hide button "Main Screen"
hide button "Ideas"
set the printScale to .6
open printing with dialog
print this card
show button "Print"
show button "Next Screen"
show button "Previous Screen"
show button "Main Screen"
show button "Ideas"
end mouseUp
Posted: Sat Jul 07, 2007 4:02 am
by dalkin
thanks Lynn, still no luck I'm afraid. Same hang. It looks like the problem is that the call to "open printing ...", prior to the appearance of "print this card", hasn't specified what is to be printed. I've purchased and downloaded the
http://www.shafermediastore.com "Printing in Revolution to OSX" and I'll see if I can sort it. Thanks for your advice though.
Posted: Sat Jul 07, 2007 5:12 am
by dalkin
Hmm ... this looks like a logic problem to me, not necessarily a bug but I think it's got 6 legs"
As before:
on mouseUp
hide button "Print"
hide button "Next Screen"
hide button "Previous Screen"
hide button "Main Screen"
hide button "Ideas"
set the printScale to .6
print this card
show button "Print"
show button "Next Screen"
show button "Previous Screen"
show button "Main Screen"
show button "Ideas"
end mouseUp
This works as expected and the card is printed to the last used printer. The "show" and "hide" are generic to the card and not of consequence (I would have thought) to the script or its function.
When I add the "open printing with dialog" command however, no matter where I place it in the script, it causes the script to hang. Logic would suggest that "open printing with dialog" is incompatible with "print this card". The "open printing with dialog" command, if it's placed before "print this card" hasn't told the system what to print, surely. If it's placed after "print this card", the print command has already been sent to the printer (without dialog) and the user can't set eg. the number of copies etc.
Result? Hang!
The booklet I downloaded says at one part: "On OSX, append the with dialog option to the open printing command (Note that you cannot use this option with the stand-alone print command". I've asked the author to clarify.
Posted: Sat Jul 07, 2007 5:51 am
by kpeters
Hmm - same OS & Rev version here. Using your code here's what I see:
Print dialog shows
I click Print
Print progress dialog pops up
I can click cancel on that - if I do, things get ugly - it hangs and Rev hangs...
Does that match what you see?
Kai
Posted: Sat Jul 07, 2007 6:03 am
by dalkin
Yes, that's it. Glad you could duplicate it. Where to from here? I'm too new to Rev to know if it's a bug or whether I'm making some sort of mistake.
Posted: Sat Jul 07, 2007 10:00 am
by Mark
Hello,
To make the OS actually execute the print job and have Revolution continue with other duties, you need to close printing after opening it.
Code: Select all
on foo
open printing with dialog
-- print this print that
close printing
end foo
Best,
Mark
[/img]
Posted: Sat Jul 07, 2007 12:04 pm
by dalkin
Three cheers Mark! Many thanks.