ShadowKiller.app

Does anyone have experience with this app, which has been around for a long time?

In normal use, toggling between its two states ( 1) shadow killed and 2) shadow not killed) is accomplished by double-clicking on ShadowKiller.app. Although not scriptable, the same result can be accomplished in AppleScript with the simple command 'tell application "ShadowKiller" to launch'. Each time invoked, that command causes "ShadowKiller" to toggle, which makes sense to me.

What I'm looking for is some way (in AppleScript) to determine which state "ShadowKiller" is in at a given moment in time -- something like 'exists application process "ShadowKiller"' (but that doesn't work, always returning true). Using a Terminal command would certainly be acceptable.

Any ideas?

MAC pro, Mac OS X (10.4.11)

Posted on Jan 7, 2010 2:47 AM

Reply
24 replies

Jan 7, 2010 7:02 AM in response to Noaks

I knew nothing of ShadowKiller.app, but I downloaded it, just to see.

In my opinion, ShadowKiller.app is always in the same state. What is toggled is not the application itself, but some Finder or System preference. It seems to me that ShadowKiller.app simply toggles a Finder or System preference, then quits.

If you run the following two lines of code:
*tell application "ShadowKiller" to launch*
*tell application "Finder" to return processes*
you will see “application process "ShadowKiller" of application "Finder"” at the end of the list returned by the AppleScript Editor. But you won't see it if you just run the last one of the above lines. Which means that ShadowKiller.app just exists momentarily.

Message was edited by: Pierre L.

Jan 8, 2010 11:23 AM in response to Noaks

Here's a good idea from [Topic : Disable window shadows?|http://discussions.apple.com/thread.jspa?threadID=1729863]
If there is an app that can delete them, then you might try contacting the author to see if you can figure out what files are used to create them

I doubt, however, that the author of ShadowKiller.app shall be willing to share his knowledge.

Jan 8, 2010 11:38 AM in response to Pierre L.

Thanks.

Unsanity has a support email address to which I've sent two queries regarding "ShadowKiller". The total response has been ZERO. So I guess your comment "I doubt, however, that the author of ShadowKiller.app shall be willing to share his knowledge." is probably on target.

But I'll see where your latest suggestion takes me. I'll let you know.

Jan 8, 2010 12:29 PM in response to Noaks

The following two files (amongst others) seem to contain a lot of information about window shadows:

/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fram ework/Versions/A/Headers/MacWindows.h

/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fram ework/Versions/A/Headers/MacWindows.r

(Just search for the word "shadow" in each of them.)

For sure, that's not for me!

Message was edited by: Pierre L.

Jan 8, 2010 2:13 PM in response to Noaks

Hello Noaks,

In the following thread, SlavaKarpenko, the author of the application, says it uses an undocumented API of Core Graphics to disable shadows.

HowtoControlOtherAppsWindows
http://www.cocoadev.com/index.pl?HowtoControlOtherAppsWindows

So, one function call seems to be able to toggle the window/menu shadows globally under OSX 10.2.x - 10.4.x.

---
In the application's binary, I see the following two symbols :
_CGSGetDebugOptions
_CGSSetDebugOptions

which may be the said undocumented APIs, I'd guess.

Cheers,
H

Jan 9, 2010 3:06 PM in response to Hiroto

Hello Noaks,

I think I managed to write a simple command line program to check whether the shadow is disabled or not. You might try the following C code to build it by yourself.

It will print 0 when normal (i.e. shadow is active) and print16384 (or precisely a number N where N && 0x4000 = 1, i.e., N div 16834 mod 2 = 1) when shadow is disabled.


#include <ApplicationServices/ApplicationServices.h>
extern void CGSGetDebugOptions(unsigned int *);
int main (int argc, const char * argv[]) {
unsigned int t;
CGSGetDebugOptions(&t);
printf("%u ", t);
return 0;
}


Provided the above executable is saved as 'CGSGetDebugOptions' on desktop, you may try the following AppleScript to determine the current shadow state.


--SCRIPT
do shell script ("~/Desktop/CGSGetDebugOptions")
set n to result as number
set _shadowIsDisabled to n div 16384 mod 2 = 1
--END OF SCRIPT


Minimally tested with OSX10.2.8 at hand and ShadowKiller 1.3, but NO WARRANTIES of any kind. 😉

Cheers,
H

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ShadowKiller.app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.