Re: Identifying concurrent processes launched by applescript
Re: Identifying concurrent processes launched by applescript
- Subject: Re: Identifying concurrent processes launched by applescript
- From: Philip Aker <email@hidden>
- Date: Fri, 01 Sep 2006 14:50:20 -0700
On 2006-09-01, at 14:11:36, Rich Reardon wrote:
We're novice scripters, attempting something in applescript that might NOT be achievable in applescript...
Our dilemma is that we're running multiple concurrent instances of VLC (an open source media player) on an OSX mac to ingest audio streams and record them locally. Automation of our Applescript works slick via cron, EXCEPT when we want to stop ONE of the concurrent processes ahead of the other.
Telling application VLC to stop from any of the launching applescripts, stops all running VLC players. We can run a shell script within Applescript to obtain appropriate PID's for particular instances, and kill a particular player process, but kill commands don't allow VLC to write a proper EOF (the resulting recorded file is no good).
Is it possible to reference the particular player spawned from the launching applescript -- a reference derived from code IN that applescript -- so we can stop that one ALONE when that player's recording interval is over? [note: each applescript is launched via cron, but the time-until-TellApptoStop command is part of the launched applescript]
Perhaps the System Events dictionary entry for "process -> unix id" might be of some help:
set res to {} tell application "System Events" repeat with f in every process set falias to file of f as alias set end of res to {POSIX path of falias, unix id of f} end repeat end tell res
Philip Aker
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden