• 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
running a script from a script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

running a script from a script


  • Subject: running a script from a script
  • From: Jim Brandt <email@hidden>
  • Date: Wed, 28 Jun 2006 06:32:29 -0500

I am trying to time-bomb a script that conditionally runs another script if files exist in a certain directory.

The first script fails with a time-out error after successfully running the second script.
Here is the code:

The Script:

set sourceFolder to "HD1:To_Be_Sent:"
tell application "Finder"
set theList to (every item of folder sourceFolder whose kind is not "folder")


if (count of the theList) > 0 then
set Mail_It to "OSX:Users:jimbrandt:Library:Scripts:OS X Scripts:Mail It.scpt"
with timeout of 300 seconds
run script (alias (Mail_It))
end timeout
end if
end tell



The Event Results:

tell application "Finder"
get every item of folder "HD1:To_Be_Sent:" whose kind ≠ "folder"
{document file "JPB.txt" of folder "To_Be_Sent" of disk "HD1"}
run script alias "OSX:Users:jimbrandt:Library:Scripts:OS X Scripts:Mail It.scpt"
"Finder got an error: Finder got an error: AppleEvent timed out."


Any suggestions as to what I'm doing wrong?

Jim Brandt
 _______________________________________________
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

  • Follow-Ups:
    • Re: running a script from a script
      • From: kai <email@hidden>
  • Prev by Date: Re: Add/remove from Dock?
  • Next by Date: Deselecting the selection in the finder window
  • Previous by thread: Re: Release Notes 1.10.7 (OS 10.4.7)?
  • Next by thread: Re: running a script from a script
  • Index(es):
    • Date
    • Thread