Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.hypercard Subject: Re: Saving and Printing Two Cards Message-ID: <10648@hoptoad.uucp> Date: 7 Mar 90 08:50:39 GMT References: <10558@hoptoad.uucp> <39171@apple.Apple.COM> <10599@hoptoad.uucp> <39224@apple.Apple.COM> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 65 In article <39224@apple.Apple.COM> jdevoto@Apple.COM (Jeanne A. E. DeVoto) writes: >[Tim points out that the user may do a Print Stack, thus changing the >settings, and then his scripted print will use those settings rather than >the ones he wants.] > >OK, how about this? Make sure the stack is set up for the settings you >want to use, then put the following in the stack script: > > on doMenu theItem > if theItem is "Print Stack..." then > set the cantModify of this stack to true > send "doMenu Print Stack..." to HyperCard > set the cantModify of this stack to false > else > pass doMenu > end if > end doMenu > >This lets the user set whatever settings are desired, but since cantModify >is on, the setting changes aren't permanent. It works (thanks), but it requires one more piece in the stack script: on idle if cantModify of this stack then set cantModify of this stack to false pass idle end idle Otherwise, interrupting the Print Stack also interrupts the script, and the stack remains locked. I wonder how much of a performance hit I'm looking at from this idle handler? (Or for that matter, from adding yet another "else if" to my main doMenu handler?) >Of course, this isn't as versatile as letting you set the Print parameters >from HyperTalk, but it'll work if you only need to use one set of >parameters. Yes. However, as you may recall, when I first raised the hidden properties issue, my objection to it was that the programmer was forced to do straightforward things in roundabout ways. This is a perfect example. I hope this problem is addressed in HyperCard 2.0. >>Also, any comments on stealing card bitmaps from the windows? > >Nothing leaps to mind. If all you need is the picture, you could always >do a Select All/Copy Picture and then use an XCMD to grab the scrap, I >suppose. I'll think about it. Nope, I need the whole card, from two separate cards, not just the pictures. I can't get two card images without two Standard File dialogs, though, unless I use an XCMD to grab the bits with CopyBits or use an XCMD to patch the Standard File Package trap, both of which are nasty. You can't say "doMenu Export File... with ". -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com FROM THE FOOL FILE: "Those Mayas were sacrificing not only pagan children, but baptized Christian children, for crying out loud! And they were carrying out those sacrifices, those barbarities, with great savagery, without giving the victims the benefit of the humane types of death that the European Church accorded even to heretics and witches during that century, such as burning at the stake." -- Matthew Rosenblatt, rec.arts.books