hello everybody,
this is my question:
is it actually possible to make an applescript do one thing, while in the mean time do something else?
each of those actions should be independent of each other.
i guess not, but maybe i missed something.
i believe i somewhere read, you can seperate commands with a semicolon (,) and applescript will try to run both command at the same time.
thanks for any help!
-jns
Current versions of AppleScript are not threaded, so not multitasking either. The way to get multiple things going is to run a script that runs others.
is this “one script that runs others” also working with just one script file containing many script objects?
the reason i ask this is, because two, at the same time running scripts might have to share (changing) variables.
-jns
Not as far as I know. Two separate scripts would have to share data by reading an external file, and how would you keep that coordinated? Only one of them can open an external file for access at a time although you can read a text file without ‘opening’ it for access (really only needed to move the eof, prevent other scripts from opening it, or write to it). Shell scripts that don’t return anything or whose output is not directed to sdout run independently of the AppleScript that ‘spawned’ them (that’s a problem when you want to wait til it’s done).
If you’re really seriously in need of this functionality, AppleScript is really not your language of choice - you need something that can be multi-threaded.
You might see a similar discussion here: http://bbs.applescript.net/viewtopic.php?id=18017 and by searching on threaded you’ll see others, equally discouraging.