[Pythonmac-SIG] [Newbee] Schedule

Bill Bedford billb@mousa.demon.co.uk
Mon, 17 Jul 2000 14:54:13 +0100


At 12:50 pm +0100 17/07/00, Erik van Blokland wrote:

>Not sure whether this is related to, the same, or something completely
>different from this thread, but it's bugging me so I'm asking anyway.
>Pardon the wordy explanation, in technical terms it is probably not so
>difficult.
>
>A python scripts calls another application (Finder, Filemaker) via
>appleevents. When a script calls for the Finder to do something simple
>like moving or copying files (I have reasons to want the Finder to do it
>- I am aware of more python-like ways)), it will take forever when the
>IDE is in the foreground (up to the point of an AE timeout error),
>whereas if the Finder is in the front it will zoom right through it. As
>if python is _so_ busy waiting for an answer from the AE that the called
>application actually gets no time to deal with the request.

I don't think this is only a python problem, you can get the same 
sort of thing happening with folder actions

>I can work around it by getting the other application to the foreground
>when the script is running, but some of these scripts can take up to 10
>minutes (a lot of stuff gets done) and it is a nuisance to carefully
>_not_ click the IDE to the front by accident. This will then cause an AE
>timeout and the whole thing has to start again.

Can't you hide the IDE when the script is running?

In applescript:-

tell application "Finder"
	set visible of process "Eudora" to false
end tell

-- 
Bill Bedford

Tourist, he decided, meant "idiot".