How to change message character set in Mail.app by applescript?
How to change message character set in Mail.app by applescript?
- Subject: How to change message character set in Mail.app by applescript?
- From: bill <email@hidden>
- Date: Mon, 24 Feb 2003 19:47:34 +0800
Hello,
Today my friend asked me that, using Mail.app; is it possible to use
applescript to change email messages into another character set.
Looking at the dictionary, there is no character set under Class message.
Using the UI scripting example from Apple, it is possible to change the
character set of each message, providing the user manually select an email
message.
(* EXECUTE SUB-MENU ITEM *)
-- replace with the target application name, the menu name, the menu item
name, and the sub-menu item name
if my do_submenu("Mail", "Format", "Text Encodings", "Traditional Chinese
(Mac OS)") is false then error number -128
on do_submenu(app_name, menu_name, menu_item, submenu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
with timeout of 300 seconds -- 5 minutes
tell process app_name
tell menu bar 1 -- menu bar
tell menu menu_name -- menu
tell menu item menu_item -- menu item
tell menu 1 -- sub-menu
click menu item submenu_item -- sub-menu
item
end tell
end tell
end tell
end tell
end tell
end timeout
end tell
return true
on error error_message
return false
end try
end do_submenu
So, is there anyway to select email message one by one, then trigger the
above method? Or do the task directly with applescript?
TIA
bill
_______________________________________________
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.