Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!spool.mu.edu!cs.umn.edu!ux.acs.umn.edu From: hughes@ux.acs.umn.edu (Steve Hughes) Newsgroups: comp.sys.mac.hypercard Subject: Need XCMD to dim screen (like a screen saver) Message-ID: <3848@ux.acs.umn.edu> Date: 2 May 91 07:26:22 GMT Article-I.D.: ux.3848 Sender: news@ux.acs.umn.edu Organization: University of Minnesota, Academic Computing Services Lines: 102 "All I want out of life is a simple way to turn the screen off instantly, then bring it back on instantly and without flicker." IUm using HyperCard 2.0 and the picture XCMD to present 256 level grey scale photographs as visual stimuli in a series of right- hemisphere testing neuropsychology experiments, and brother, I got trouble. In the good ol' days of early April, the Ph.D. candidate whose dissertation is riding on this stuff was really happy with how things were looking--just loved to see those grey scale photos flash onto the computer screen (they appear in pairs, one after the other). Here is how I did it: put "PictureA" into pic1 put "PictureB" into pic2 picture pic2,file,rect,false picture pic1,file,rect,false set the visible of window pic1 to true wait for 30 ticks set the visible of window pic1 to false wait for 30 ticks set the visible of window pic2 to true wait for 30 ticks set the visible of window pic2 to false My problem: One week before subjects are to be run, she decides that the pictures do not appear smoothly enough, too much flicker when we set visible to true. The Ph.D. candidate screams, "THE PRESENTATION OF STIMULI MUST BE INSTANTANIOUS! HOW COULD WE HAVE MISSED THIS? IT'S A DISASTER!" Hmmm...seems all the prior literature is based on instant presentation of stimuli (using a fast iris called a "tachistascope" mounted on the front of a slide projector lens--instant open, instant closed). Here's what happens: when I set visible to true, the picture sort of "rolls" into visibility--presentation is not in sync with the vertical retrace of the monitor (or it can't do it fast enough to make it in one blanking period). The pictures sure appear fast on a IIci, but not without some noticeable flicker. Trouble. Facing total ruin, I consider a new career cleaning out public lavatories. Then: Inspiration! I don't need to make the picture XCMD faster--I can create exactly the effect I want if I can shut off the whole screen while I set the visible of the picture to true, then turn the screen back on after I've made the picture visible. I'd do it like this: screenOff <--- XCMD to dim screen to black instantly set the visible of window pic1 to true screenOn <--- XCMD to turn screen to white instantly wait for 30 ticks screenOff set the visible of window pic1 to false wait for 30 ticks set the visible of window pic2 to true screenOn wait for 30 ticks screenOff (etc.) Can this be done? I think so, screen savers do it all the time. I've got AfterDark set to the "Face Away" module with 0 second dim time and 0% intensity. "Blip!" screen off. "Blip!" screen on. Pictures (and, of course, everything else) appear and disappear INSTANTLY. just like I want them to. Different settings make it fade slower or to a less dark final brightness. So it looks like I CAN turn the screen off and on, instantly and with out flicker. My other problem: I have no idea how this is done! Looks like there must be some (God willing, fairly easy) way to adjust the screen brightness with software (note the Mac Classic's Brightness cdev). Maybe a hardware location? Maybe a toolbox call? Well? Does anybody know anything about this? -Steve P.S. Changing the odd and confusing bit depth parameter of the picture XCMD does not speed it up (like it should?). "I'm at the end of the road, my back's against the wall, I'm outta' ammo, sweet God Almighty, does _somebody_ know the answer?" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Steve Hughes Pediatric Neuropsychology University of Minnesota hughes@ux.acs.umn.edu ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++