Mail Scripting GUI
Mail Scripting GUI
- Subject: Mail Scripting GUI
- From: Marcus Rodrigues <email@hidden>
- Date: Mon, 28 Jul 2003 17:43:12 -0300
Well, thx to a lot of people, my script is growing ;-)
However, it is now giving me an error in the part that saves the
attachments:
System Events got an error:
NSReceiverEvaluationScriptError: 4
Can anyone try my script? All u need is an unread message in Mail.app
and to change the name of the mailboxes. The unread messge will need an
attachment for testing purpose too.
Here's the script:
tell application "Mail"
activate
set lista to every message of mailbox "In" of account "Marcus" whose
the is read is false
set aMessage to every item in lista
-- Select messages
repeat with aMessage in lista
set selected messages of message viewer 1 to {aMessage}
tell application "System Events"
tell process "Mail"
set frontmost to true
set frWdw to the name of window 1 as string
click menu item "Print..." of menu "File" of menu bar 1
-- or keystroke p with command down
delay 5
tell window frWdw
keystroke return
end tell
window frWdw
end tell
end tell
delay 5
tell application "System Events"
tell process "Mail"
set frontmost to true (**)
set theWindow to the name of window 1 as string
click menu item "Save Attachments..." of menu "File" of menu bar 1
delay 1
tell window theWindow
tell sheet 1
tell group 1
tell pop up button 1
click
delay 1
click menu item "Desktop" of menu 1
delay 1
end tell
end tell
click button "Save"
delay 20
end tell
end tell
end tell
end tell
end repeat
end tell
I am no professional scripter, so I have no idea where am I going wrong
=-(
Thx for all help.
o#? Marcus Rodrigues o#?
iBook 600 - Combo - Jaguar
CC4nsul do Brasil Apple Clube - Caxias do Sul
ichat: marcusrodrigues
mailto:email@hidden
http://homepage.mac.com/marcusrodrigues
_______________________________________________
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.