Re: aborting a running script
Re: aborting a running script
- Subject: Re: aborting a running script
- From: Jan Bultereys <email@hidden>
- Date: Mon, 28 Feb 2011 13:54:09 +0100
- Thread-topic: aborting a running script
Title: Re: aborting a running script
Hi Jim,
You can set up “timehandler” in your script where it cancels the script if the scirpt runs for example longer than 15 minutes....
-- on start — log the time
-- on run compare the time and cancel when due time has been reached....
Your second question... something quick and dirty... since I don’t know your output intent..
set mainfolder to "/Users/belmac42/Desktop/mainfolder"
set thelist to do shell script "cd " & mainfolder & "; ls -R"
Change belmac42 to your user
Change mainfolder to a folder on your desktop where you have folders and files inside....
Best regards,jan
On 28/02/11 13:31, "Jim Brandt" <email@hidden> wrote:
I have a question about aborting a running script.
When invoked from the script menu, which application or process is in control of running the script? Is it System Events? Is there a graceful way to cancel the script while it is running?
I have several scripts that walk file directories, and after starting them, they take longer than I intended and I want to shut them down. So I'm looking for a way to do this without putting dialog in that needs responded to every so often.
Is there an accepted way to do this. Stopping a process from Activity Monitor?
Also, does anyone have a way to build a list of all files regressively in folders below the current level?
i.e.
folder 1
file 1
file 2
file 3
folder 2
file 4
file 5
folder 3
folder 4
file 6
file 7
I want a list of the paths of all files (and folders) shown. Can the Finder give this in a single command?
TIA,
Jim
_______________________________________________
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
Met vriendelijke groeten / Cordialement / Kind regards,
Jan Bultereys
Asst Manager Cat. Prod. Systems Creative Services Benelux
Office Depot
Schoonmansveld, 28
2870 Puurs
Belgium
T +32 (0)3 860 55 02
F +32 (0)3 860 55 49
M +32 (0)474 52 98 57
E-mail: email@hidden
Delivering Winning Solutions that Inspire Worklife
This email and any attached files are confidential and may be legally
privileged. If you are not the intended recipient, any disclosure,
reproduction, copying, distribution, or other dissemination or use of this
communication is strictly prohibited. If you have received this
transmission in error please notify the sender immediately and then delete
this email.Email transmission cannot be guaranteed to be secure or error
free as information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. The sender therefore is in no way
liable for any errors or omissions in the content of this message, which may
arise as a result of email transmission. If verification is required,
please request a hard copy.
_______________________________________________
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