Re: a few questions
Re: a few questions
- Subject: Re: a few questions
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 02 Nov 2001 13:17:18 -0500
- Organization: [very little]
>
Date: Fri, 2 Nov 2001 05:36:53 -0600
>
To: email@hidden
>
From: Jim Brandt <email@hidden>
>
Subject: a few questions
>
Now, the questions:
>
>
1) How can I tell when Eudora has finished sending all the messages?
>
In OneClick, I did this with " Wait NOT Process(":CSOm").Exists".
>
Does AS have something equivalent? I have more to do in the script,
>
but it is dependent on the files being sent first.
You might quit Eudora after it's done processing. Then you could put in
a delay loop that uses the Finder to see if the Eudora process exists.
When it no longer exists, Eudora is finished sending all the messages.
tell application "Finder"
repeat
if name of processes does not contain "Eudora" then
exit repeat
end if
delay 3 -- three second delay until it checks again
end repeat
end tell
>
2) The copyList list is being built to move the files, once they're
>
sent, to a different folder. Is there an easy way to build a list of
>
files and move them from one folder to another, or do you have to go
>
through the list and rename them one at a time?
tell application "Finder"
move files of folder "srceFldr" to folder "destFldr"
end tell
>
3) If I have several large files to send, the above script times out
>
with an AppleEvent timeout. Is there a way to keep Applescript
>
waiting on Eudora until Eudora has completed it's tasks?
Bracket your tell block with timeout statements:
with timeout of NNNN seconds
--the Eudora tell block
end timeout
This extends the timeout limit to the number that replaces "NNNN"
>
4) Where do I find example scripts for specific applications (like
>
Eudora)? I learn best by seeing an example and modifying it for my
>
own use. Unfortunately, the majority of what I've found so far is for
>
Quark Express, which I don't even own.
You might try <
http://www.emailman.com/eudora/mac/scripts.html>. I got
that by the simple expedient of going to <
http://www.google.com> and
entering "Eudora scripts" in the search engine. There were a LOT of hits.
>
5) Is there a way to do the equivalent of Drag and Drop. I wish to
>
build a list of filenames to be worked on by a program. Again, I do
>
this in Oneclick by building a list and then issuing the command
>
"Open List, Program".
property fileList : {}
on run
-- do what you want with the list of files
set fileList to {}
end run
on open (itemList)
set fileList to fileList & itemList
end open
This is untested, but what it should do is build a list of files as you
drop them on the applet's icon. When you double-click the icon it will
do what you specify in the run handler and then clear the list.
I don't use OS X, so results may vary.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[11/2/01 1:10:42 PM]