• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript After Launchd Job
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript After Launchd Job


  • Subject: Re: AppleScript After Launchd Job
  • From: Philip Aker <email@hidden>
  • Date: Sat, 6 Jun 2009 01:13:32 -0700

On 2009-06-05, at 22:00:37, Pierce Freeman wrote:

Thanks for your reply. However, I am including the actual code in the
Launchd file (I know, I know) so how would this translate into that
scenario? I get what you are saying, however I am just not seeing how that
could be translated into Launchd.

Maybe you'd better show the salient part of the LaunchAgent plist.
Inline scripts work kinda like NSTask.
One non-obvious part about shell scripts in that format is that they have to be XML escaped.
Otherwise, it's just the same as the single line example but you would use the -e option for osascript.



I am making a Launchd job, and want to run an AppleScript once it is
done
with it's main task.  I want my cd job to run, and then a follow-up
AppleScript to run afterwards.  My problem is that I don't know how
to use
two different "main codes" (ex. cd) to be run in one launchd.


I'm guessing you would want something like the following in your shell
script:



cd /path/to/dir;
osascript /path/to/some.scpt;


To run multiple shell script calls from a single line it would be:


cd /path/to/dir;osascript /path/to/some.scpt;


The basic command separator is a semicolon.

Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: AppleScript After Launchd Job
      • From: Pierce Freeman <email@hidden>
References: 
 >Re: AppleScript After Launchd Job (From: Pierce Freeman <email@hidden>)

  • Prev by Date: Re: Xcode and text field
  • Next by Date: Re: Operator vs. Command precedence
  • Previous by thread: Re: AppleScript After Launchd Job
  • Next by thread: Re: AppleScript After Launchd Job
  • Index(es):
    • Date
    • Thread