AppleScript to restore SheepShaver screen colors

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

AppleScript to restore SheepShaver screen colors

Post by emendelson »

Another thread mentions the problem of screen colors that change in SheepShaver after minimizing the SheepShaver window in OS X.

My solution for this (used in an OS 8.6 system; something different might be possible in OS 9) is to install the GTQ osax "Set Depth to", downloadable here (I believe):

http://www.info-mac.org/viewtopic.php?f ... ng+Library

Then create an AppleScript app with these two lines:

Code: Select all

set depth to 16
set depth to 32
Run that AppleScript app to restore screen colors when needed.
User avatar
Old-School-BBSer
Apple Corer
Posts: 223
Joined: Sun Mar 01, 2015 8:58 am
Location: Guam

Re: AppleScript to restore SheepShaver screen colors

Post by Old-School-BBSer »

I also got this to work in Mac OS 9.0.4 running SheepShaver 2.4 (20140201).

I downloaded the "GTQ Scripting Library 1.2.1" .hqx archive from http://www.info-mac.org/viewtopic.php?f ... ng+Library and installed just the "Set Depth to" scripting addition in OS 9.0.4's "System Folder/Scripting Additions" folder, as per emendelson's suggestion.

I downloaded the AppleScript 1.4.3 (International Version) installer from http://www.gla.ac.uk/~gwm1h/macos9/ because both 1.6 and 1.8.3 are too new for OS 9.0.4.

In case you are wondering, I didn't have Apple's Script Editor installed in my system, because I run a very lean 9.0.4 so that SheepShaver runs as quickly and as efficiently as possible.

Once AppleScript was installed, I just created a new script with just the lines . . .

set depth to 16
set depth to 32

. . . as the OP explained.

I saved it as a "classic applet" and placed it in my main "AppleScript" folder -- normally found in the "Apple Extras" folder -- and then put an alias of it on my SheepShaver desktop.

Whenever my screen turns blue, I just double-click the desktop alias. I find that it is a lot quicker and easier than having to do the following:

1. Select "Control Panels" under the Apple menu.
2. Select the "Monitors" control panel.
3. Switch the color depth to "Thousands".
4. Switch the color depth back to "Millions".
5. Close the "Monitors" control panel.

You could just downgrade to "SheepShaver_10-25-2009_UB.zip" as Ronald P. Regensburg suggests in other posts, in order to get rid of the blue screen problem. However, by doing so, you will lose some of the functionality that was added in SheepShaver 2.4 (20140201). You may possibly also mess up other parts of your SheepShaver installation, by accident. That made me a bit nervous, so I went the script route instead.

It's your choice. I personally just prefer to click my desktop script alias. :)
Bill Kochman
Armageddon BBS
Guam, Mariana Islands, USA
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: AppleScript to restore SheepShaver screen colors

Post by rlesperance »

Hi emendelson ... You wrote:
Another thread mentions the problem of screen colors that change in SheepShaver after minimizing the SheepShaver window in OS X.
What if I don't minimize the Sheepshaver window ... Is there still a problem ? And how do I do that ?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: AppleScript to restore SheepShaver screen colors

Post by Cat_7 »

Hi,

This screen problem only appears after the SheepShaver window has been minimized and is then restored to its previous size.
If you run full screen you cannot minimize the window; if you run in a window and never minimize the screen the problem will of course not show up.

Best,
Cat_7
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: AppleScript to restore SheepShaver screen colors

Post by Ronald P. Regensburg »

SheepShaver is only in English, so there it is called "Minimize", see Window menu > Minimize (command-M). In applications that are French localized, it is "Placer dans le Dock" (depuis le menu Fenêtre). It can also be invoked by clicking the yellow button in the top-left corner of the window. If you do not use Minimize, or do not hide SheepShaver, the color issue will not happen.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: AppleScript to restore SheepShaver screen colors

Post by Ronald P. Regensburg »

Another solution to get the SheepShaver window out of the way temporarily without minimizing or hiding, may be the use of WindowMizer. WindowMizer mimics the windowshade minimize feature that existed in MacOS. When you use the settings in WindowMizer advanced preferences to "minimize" off-screen instead of to the Dock (off-screen is the default setting in latest version), the color issue will not occur when the SheepShaver window is rolled back in place.

http://www.rgbworld.com/
Last edited by Ronald P. Regensburg on Fri Oct 23, 2015 7:51 pm, edited 1 time in total.
Reason:  
User avatar
Old-School-BBSer
Apple Corer
Posts: 223
Joined: Sun Mar 01, 2015 8:58 am
Location: Guam

Re: AppleScript to restore SheepShaver screen colors

Post by Old-School-BBSer »

Ronald, as you may recall, I in fact use WindowMizer with my VirtualBox/Mountain Lion/SheepShaver setup under El Capitan.

I tried using the off-screen approach, but I did not like it. In fact, the developer himself informed me that he does not particularly care for it either, and only added it, because some folks wanted it.

I in fact have the "Destination of original window" setting set to "Minimize to Dock", and it works just fine. In other words, no blue screen. However, please note that what I am actually minimizing is the entire VirtualBox Mountain Lion VM window, and not just the SheepShaver window which is inside it.

If you were to install WindowMizer inside of Mountain Lion instead, and use the "Minimize to Dock" option, then, yes, you would get the blue screen if you minimize and restore the SheepShaver window.

So, basically, I just minimize at one window level up, in order to avoid the whole mess.
Bill Kochman
Armageddon BBS
Guam, Mariana Islands, USA
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: AppleScript to restore SheepShaver screen colors

Post by Ronald P. Regensburg »

You are right, but please do not confuse readers of this thread with references to your specific setup inside VirtualBox. This thread is about the color issue after minimizing or hiding the SheepShaver window. Minimizing or hiding the window of VirtualBox in which SheepShaver is running does, of course, not affect SheepShaver.

With respect to the off-screen minimizing vs minimizing to the Dock by WindowMizer: I myself prefer the off-screen minimizing because it is much faster then minimizing to the Dock. The fact that it does not affect colors in SheepShaver is a nice bonus.
Last edited by Ronald P. Regensburg on Fri Oct 23, 2015 9:54 pm, edited 1 time in total.
Reason:  
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: AppleScript to restore SheepShaver screen colors

Post by rlesperance »

Thanks for this French precision.
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: AppleScript to restore SheepShaver screen colors

Post by rlesperance »

I never «Minimize» my SheepShaver window. I don't really need to see under it. I have a large screen so, if needed, I can move it enough to see. WindowMizer will not help.

The «blue ghost» appears when, from within SheepShaver, I use the Dock to switch to work with another app and come back. Switching to another app is like hiding it ... so the «blue ghost» is still an issue.

Thank you all for trying to help.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: AppleScript to restore SheepShaver screen colors

Post by Ronald P. Regensburg »

How do you switch to another application? Only when you do that while hiding SheepShaver, the color issue will occur. Simply switching to another application by clicking its icon in the Dock will not hide SheepShaver (or any other application). Only switching to another application by option-clicking its icon in the Dock will hide the application that is in front and command-option-clicking will hide all other applications. I hardly ever use that, I keep windows of other applications open behind the windows of the application(s) I am working in.

Or maybe you use a "single application mode" setting in a utility like TinkerTool to always hide all other applications when switching between applications?
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: AppleScript to restore SheepShaver screen colors

Post by rlesperance »

Ronald ... You are a genius. I use the Onyx utility, and the single application mode was activated. Is it possible to exclude some app from this single mode ?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: AppleScript to restore SheepShaver screen colors

Post by Ronald P. Regensburg »

I don't think so. It is a hidden preference that is generally applied.

I myself feel no need to hide applications. If I do not intend to continue using an application for a longer period of time, I quit it. Most applications will continue to run when only their windows are closed, one click in the Dock and they are back instantaneously. For instance Mail and Safari are running that way permanently on my Mac. When I switch to another application with other application's windows still open, those windows will usually be mostly covered by windows of the active application. If the presence of such a window in the background bothers me and I do not want to quit that application, I double-click its title bar and MiniMizer will reduce it to its title bar until I double-click it again. I never use Apple's minimizing to the Dock. I forget which windows are open when I do.
Last edited by Ronald P. Regensburg on Sun Oct 25, 2015 12:12 pm, edited 1 time in total.
Reason:  
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: AppleScript to restore SheepShaver screen colors

Post by rlesperance »

Thank you ... I will not reactivate the "single application mode" (SAM).

I agree that windows actually cover most of my desktop and that they don't cluter the view as before. In the past, I found SAM very useful. Now that I use "BetterSnapTools" to resize and position in a snap any of my windows, SAM is less of help ... if I also consider that sometimes it does not work everytime and requires occasionnaly to do it manually.

Anyway, hiding all other windows is the OS X equivalent of SAM. It is so easy to execute from the keyboard when needed. So I am only left with not hiding all other windows while SheepShaver is running.

Thanks for taking the time.
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: AppleScript to restore SheepShaver screen colors

Post by rlesperance »

... and there is also OS X's Spaces. I didn't use it before. By creating a specific «space» for SheepShaver and for any other app that I use, clicking on any app in the Dock simply does the same thing SAM does ... and without any «blue ghost effect. I also read that I can get rid of Spaces's transition effect. So this is the best of all worlds.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: AppleScript to restore SheepShaver screen colors

Post by Ronald P. Regensburg »

I have no need for Spaces but that is indeed also a good solution if you want to keep SheepShaver running while doing other work.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: AppleScript to restore SheepShaver screen colors

Post by adespoton »

As of 10.11, Spaces finally works in a fully usable way for an old-schooler like me. I now launch apps each in their own space and can easily flip between them. The spaces can persist across reboots, and remember what launched in them. If you haven't tried it recently, I recommend it. It finally does almost all the things we've been hacking and patching to provide for the past 15 years.
Post Reply