Re: running a script from a script
Re: running a script from a script
- Subject: Re: running a script from a script
- From: kai <email@hidden>
- Date: Thu, 29 Jun 2006 23:28:10 +0100
On 28 Jun 2006, at 12:32, Jim Brandt wrote:
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
Try taking the run script statement out of the Finder tell block, Jim:
----------------
tell application "Finder" to set items_ready to (count (items of
folder "HD1:To_Be_Sent:" whose kind is not "folder")) > 0
if items_ready then run script alias
"OSX:Users:jimbrandt:Library:Scripts:OS X Scripts:Mail It.scpt"
----------------
---
kai
_______________________________________________
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