[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Running application



>It's because you're using AppleScript to run the program, and AppleScript
>cares or doesn't care that something is "finished" based on obscure (to me)
>reasons, although I bet an expert in AppleEvents can explain it.  You've
>got two not very thrilling choices. Put a sleep($n); just before your
>open() statement, where $n contains the number of seconds it's likely to
>take for your SPSS run to complete.  Or do the same thing inside the
>AppleScript with one of the OSAXen that can wait.  I don't know if any of
>the OSAX do anything more than putting the processor in a tight loop,
>though, so the Perl solution is probably better.

Alas, try this - makes an applescript 'wait' x secs, without any extra 
osaxen.. dont try this with a '1' on seconds (sometimes, just sometimes 
it misses the first fraction of a sec pass, thus sending it out on an 
infinitive loop)

set x  to 0
set curd to current date
repeat until x = 15
    if curd + 3 < current date then set x to 15
end repeat

^^^^^^^^^^^^^^^^^^^
3 sec 'wait'.


Kristoffer Andsten

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch