openprocedure "insert a procedure name here"
print ""
message info("dialogtrigger")
I cannot get any statement to execute after the print statement within a procedure. Similarly, if I try to print a form. No problem if I try to print the data sheet of the active database or another database.
This problem exhibits on three differently configured computers.
openprocedure ".AreaCoder"
print ""
openform "MapLetter"
message "I've just printed that procedure and opened the form."
After printing nothing happened. [Well, to be very accurate, the first time line 3 wasn’t there and I got an alert saying something like Dialog aborted, after which nothing happened. The second time I ran that one some sort of message box appeared for about a tenth of a second which I couldn’t read. Then I added line 3 and after printing finished, nothing.
I put the line
Pause""
after print and I then consistently got a flashing alert, but it didn’t open that form.
So there does seem to be some problem here.
(Once again replying from my mail program didn’t post here.)
I’m so pleased that this is a genuine bug and not just an aberration on this side of the Date Line.
I’ve seen this all the time - I set up an extremely long message and it was easier to see that it was, in fact, that message which flashed on and off. My recollection is that it doesn’t appear if I hit the Cancel button.
openprocedure “.AreaCoder”
print “”
openform “MapLetter”
message “I’ve just printed that procedure and opened the form.”
After printing nothing happened. [Well, to be very accurate, the first time line 3 wasn’t there and I got an alert saying something like Dialog aborted, after which nothing happened. The second time I ran that one some sort of message box appeared for about a tenth of a second which I couldn’t read. Then I added line 3 and after printing finished, nothing.
I put the line
Pause""
after print and I then consistently got a flashing alert, but it didn’t open that form.
openprocedure "insert a procedure name here" print "" message info("dialogtrigger")
I cannot get any statement to execute after the print statement within a procedure. Similarly, if I try to print a form. No problem if I try to print the data sheet of the active database or another database.
This problem exhibits on three differently configured computers.
I ran into the same problem, when I tried to run a procedure with a print command inside a loop. The loop stops at 1, even though it should have run through and printed 5 times.
Sorry to say this may not be fixed for a long time (or possibly ever). I would suggest using the printtopdf statement, which despite the name has an option to print directly to a printer rather than to a PDF file. There’s no dialog, you have to specify the print options in the code, but I’ll bet in the case of @jcrunch with his 5 times loop he probably didn’t want 5 dialogs anyway!
No, there is no way to specify options that are specific to a particular printer. Since not all printers have multiple trays, this is not included in Apple’s printing API (at least as far as I can tell).
Multiple trays are just one option, and for me, it is not a problem, because my printer chooses according to page size, so I have been able to print letters and envelopes both in the same procedure.
There is probably some way of doing it through the CUPS interface.
Is it feasible for you build a work-around in PX that uses printtopdf? It would have to have some default limitations but at least the print command would work.
Incidentally, this probably means it is an Apple bug: Print without the dialog does not have a return command, while Print with the dialog does. Has anyone tested this with Mojave? If it is not fixed, it should be reported as a bug.