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 9, 2010 5:06 PM in response to Hiroto

A reason for real optimism? But you're dealing with a novice with some of these issues, so I need a suggestion as to how the code

#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;
}

should be saved to the desktop as an executable. Otherwise (even for me), the approach seems remarkably straight forward. (I take it you've acquired a machine to deal with felines, as you said you might.)

Jan 9, 2010 7:37 PM in response to Noaks

Hello Noaks,

You can use Xcode (from Developer Tools) to build the program. Well, it's quite complicated to explain how.
Fortunately, you may use gcc in command line for building this simple one.

For example :

1) Copy/paste the C source code to a new plain text file and save it as 'CGSGetDebugOptions.c' on Desktop.

2) In Terminal.app, set current directory to ~/Desktop and run gcc compiler as below :

cd ~/Desktop
gcc -framework ApplicationServices -o CGSGetDebugOptions CGSGetDebugOptions.c

It will yield an executable file named 'CGSGetDebugOptions' on Desktop.

3) To run and test it, type as below (note the period before slash) and press return.

./CGSGetDebugOptions

If it prints 0 or 16384 according to the current shadow state, you're done.

Good luck,
Hiroto

P.S. Yes, now I'm keeping a feline in a beautiful Pismo, PowerBook G3 500, just for pleasure.
Still watching for a good old G4 QS for heavier use, though.

Message was edited by: Hiroto (fixed typo)

Jan 9, 2010 10:31 PM in response to Hiroto

A little bleary eyed at 1 in the morning and still having issues. In Terminal I'm getting '-bash: gcc: command not found'

Before receiving your latest post, I was poking around and got this suggestion:

*************
In Terminal:
chmod a+x and drag in the saved text file.
Then, remove the file's extension in its Info window in the Finder.
*************

That did yield a Unix Executable File with the proper name on the Desktop

But then when I ran the AppleScript I got this error:

/Users/pjnoaks/Desktop/CGSGetDebugOptions: line 3: syntax error near unexpected token `('
/Users/pjnoaks/Desktop/CGSGetDebugOptions: line 3: `extern void CGSGetDebugOptions(unsigned int *);'

I'm going to sleep on this. I don't know whether that might have been an inappropriate way to get the executable file, or whether there's another problem. Evidently I don't have gcc, and therefore can't establish an executable file by the procedure you suggested; could this be operating system related?

Jan 9, 2010 11:03 PM in response to Noaks

Hello

Probably you need to install Xcode (Developer Tools), which comes with OSX 10.4, in order to have gcc installed.

*If you don't have Xcode DVD (or CD) at hand, you may download it from Apple for free.
http://developer.apple.com/technology/xcode.html

Get Xcode for OSX 10.4, probably Xcode 2.4.1 or 2.5.
(You need to register free ADC membership to download Xcode.)

All the best,
H

Jan 10, 2010 1:46 AM in response to Hiroto

I installed Xcode from the original installation DVD and everything works perfectly. As usual, your response is the one to look forward to in cases like this! So much for the naysayer(s).

(It's a good thing I didn't have to download the required software, as I'm in a remote area where at the moment I'm stuck with dial up. I did download 10.6.2 successfully a few weeks ago (~750 MB) but it took some 80+ hours with I think 42 connection breaks! I may still be faced with that as eventually I would like this to work on operating systems beyond 10.4).

Take good care of that cat until you find your QS.

Jan 10, 2010 2:06 AM in response to Pierre L.

Don't know whether you've been following this, but obviously Hiroto did the heavy lifting. But your finding initially was pretty much what kept me in pursuit of an answer.

The Unsanity stuff sure has a controversial reputation. At one point, I was about to give up with it and then found it a nightmare trying to get rid of it (Unsanity claims there's an uninstaller, but I couldn't find it, and they were typically unresponsive to queries). Actually, I wound up using AppDelete, which is very modestly priced shareware. It seemed to do the job whereas other software didn't -- AppDelete is a thoughtfully constructed application.

Being able to get rid of ShadowKiller gave me the confidence to reinstall it and go on with my original pursuit; it does, after all, yield visual improvements in certain cases.

Jan 10, 2010 10:36 AM in response to Pierre L.

"How come? Isn't just trashing the ShadowKiller.app icon enough?"

Sometimes it didn't seem so, but the whole issue was vastly complicated by the fact that I had added ShadowKiller to the bundles of several draft scripts and applets -- and in some cases had made safety copies of those. In any case, after I thought I had found and deleted all instances of the application, shadows would come and go and I couldn't immediately tell why. AppDelete can create a log of every instance it finds, including hidden instances -- and allows you to delete only those instances you really want to, and even has an UnDo capability. Do I sound like an advertisement for AppDelete? At present, separate versions are required for Tiger and the Leopards, but they're only US$5 or ~US$7, and it looks like a unified version will eventually be available. Seems cheap when I think how long I spent trying (unsuccessfully) to do it manually.

By the way, Hiroto often comes up with amazing solutions. In this instance, I do think he may have been in small part motivated by Dewey Sachs' assertion that it couldn't be done.

Jan 10, 2010 12:17 PM in response to Noaks

Hello Noaks,

Glad to hear you have got it working.
This is my first atempt to somehow reverse-engineer an undocumented function of OSX's framework.
I've done it out of curiosity, not from ruffled feathers. And it was fun. 😉

Regarding Xcode, every OSX package, whether full or upgrade version, should come with corresponding Developer Tools and so you wouldn't have to download it from Apple unless you need the latest Xcode available for your OS version. However, I may be wrong.

Downloading a huge file though a dial-up connection would be something like running a bath through a straw.If you're being faced with it, you have my sympathies.

Take good care not to catch a cold!

Hiroto

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.