• 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: gaining control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: gaining control


  • Subject: RE: gaining control
  • From: Jim Brandt <email@hidden>
  • Date: Sun, 26 Oct 2003 07:00:13 -0600

How did you incorporate the sample code into your script? It works
here when "message outgoing_" points to an appropriate target.

-- Rob

Here's the entire script:

set script_filename to "OSX:Library:Scripts:My_Lib"
set My_Lib to load script file script_filename

tell application "Finder"
activate

set sourceFolder to alias "HD1:To_Be_Sent:"
open sourceFolder
set theList to (every item of sourceFolder whose kind is not "folder")

if (count of the theList) = 0 then
activate
display dialog "Nothing to send"
error number -128
end if

set thedate to my Get_ddmmmyy(current date) of My_Lib

with timeout of 600 seconds -- 10 minutes
tell application "Eudora"
activate

set my_id to make message at end of mailbox "Out" of mail folder ""

set field "to" of message 0 to "me_at_work"
set field "subject" of message 0 to thedate
repeat with n from 1 to the count of the theList
attach to message 0 documents ((item n of theList) as alias)
end repeat
queue message 0
connect with sending without checking

-- delay 5
repeat
if status of message my_id is not sent then
delay 10
else
exit repeat
end if
end repeat
quit

end tell
end timeout


activate
-- move theList to folder "HD1:To_Be_Sent: Sent:" with replacing

end tell

It sends every file in folder "HD1:To_Be_Sent:" as an attachment
in one email message.

It all works great except quit command tries to execute while the
message is still being sent. Under previous versions of Eudora,
control never came back to the script until the transfer was complete.
Now I'm getting a dialog that needs to be responded to, because I'm
trying to quit while the send is taking place in the background (ain't
multitasking wonderful :).

There are times when I want to just walk away while the script does
its thing without needing to deal with a dialog.

Besides, as a programmer, I KNOW it possible. I just gotta find the way.

Jim
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • RE: gaining control
      • From: Rob Jorgensen <email@hidden>
  • Prev by Date: Newbie GUI Questions
  • Next by Date: FileMaker question: refresh
  • Previous by thread: RE: gaining control
  • Next by thread: RE: gaining control
  • Index(es):
    • Date
    • Thread