At 10:38 +0200 2002.06.03, Bart Lateur wrote:
>On Sun, 2 Jun 2002 14:23:16 +0100, Alan Fry wrote:
>
>>However there is a glitch. Running this script:
>>
>> if (!IsRunning('GKON')) { LaunchApps('GKON')}
>> Hide('GKON');
>>
>>If 'GraphicConverter' is not running, then it is launched but the
>>'Hide' event fails:
>
>>Any ideas?
>
>My idea is that the Hide() instruction comes too early for Graphics
>Converter to receive it. It is probably not even fully started up yet.
Here's something you can play with, sorta off the top of my head:
#!perl -w
use Mac::Glue ':all';
my $finder = new Mac::Glue 'Finder';
my $gcon = new Mac::Glue 'GraphicConverter';
# construct property object record only once
my $visible = $finder->prop(
visible =>
application_process =>
$gcon->get( $gcon->prop('name') )
);
# keep setting to false, until it is false :-)
while ($finder->get( $visible )) {
$finder->set($visible, to => gFalse);
}
--
Chris Nandor pudge@pobox.com http://pudge.net/
Open Source Development Network pudge@osdn.com http://osdn.com/