simplePrint

Klaus Major klaus at major-k.de
Sun Sep 12 12:26:11 EDT 2004


Hi Ryno.

hoe gaat het met U? :-)

> Hello.
>
> I need a simple printing solution. I am putting together a School 
> Yearbook in Rev in such a way that every card is also a printable 
> page. It is a very small school, and very few of the parents have 
> Macs, which is what I work on. So I need something chiefly for 
> Windows, as I could make available separate CDs for Mac parents. A 
> catch-all solution would be nice, though.
>
> As one of the buttons,  I have "Print". Then I would like to give in a 
> drop-down menu the option of "Print this page" or "Print the Yearbook 
> (80 pages)". (The pages are in landscape so I would have to include 
> printRotated)
>
> ------- the following script does NOT work -------
> on menuPick which
>   switch which
>     case "Print this page"
>       set the printRotated to true
>       print this card
>       break
>     case "Print the Yearbook (60 pages)"
>       print this stack
>       break
>     end switch
>     end menuPick
> -------
> I also tried a "answer" dialogue, but I could not find any 
> documentation on how to handle three options; "Print this page" or 
> "Print this stack" or "Cancel".
>
> Does anyone have a a simple, or even a complicated, solution to my 
> problem? It might even be nice to make available a kind or a standard 
> script for less experienced scripters.

i think "printrotated" is not always supported...

Try this:

on menuPick which
   switch which
     case "Print this page"
       answer "Please select landscape format in the print dialog..."
       ## optional
       answer printer
       ## will display the printer dialog
       if the result = "cancel" then exit menupick
       ## User clicked cancel in that dialog...
       print this card
       break
     case "Print the Yearbook (60 pages)"
       answer "Please select xxx (don't know the english word :-) format 
in the print dialog..."
       ## optional
       answer printer
       ## will display the printer dialog
       if the result = "cancel" then exit menupick
       ## User clicked cancel in that dialog...
       print this stack
       break
     end switch
  end menuPick

Hope that helps...

> Ryno.

Groetjes

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list