• 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: Ent 2008 Remove text "AUGD: " from Subject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ent 2008 Remove text "AUGD: " from Subject


  • Subject: Re: Ent 2008 Remove text "AUGD: " from Subject
  • From: Barry Wainwright <email@hidden>
  • Date: Sat, 10 Jan 2009 16:25:34 +0000

This one if slightly simpler:

tell application "Microsoft Entourage"
	set currentMessages to the current messages
	repeat with theMsg in the currentMessages
		set str to the subject of theMsg
		if str begins with "AUGD:" then
			set str to text 6 thru -1 of str
			try
				repeat until first character of str is not " "
					set str to text 2 thru -1 of str
				end repeat
			on error
				-- str is empty
				set str to "<No Subject"
			end try
			set subject of theMsg to str
		end if
	end repeat
end tell

On 9 Jan 2009, at 22:20, Geoff WALLACE wrote:

Hello All,

Need some help with a Script.

Have a script that removes [ ] from the Subject.

Opened in Script Editor and changed it to remove "AUGD: " from the Subject.

Script below.

[Snip


The script compiles ok but on run in Script Editor, it errors with the message "Cant make "AUGD: " into type boolean"

If I select a message in Ent and run the script, nothing seems to happen?

Any clues to solve the problem please.

Mac Pro with 2.66 GHz Dual core 2 Duo and 7 GB RAM running OS X 10.5.6 with
all Apple Updates installed.


--
Do you own or use an Apple Macintosh Computer?
If so at some time you will need the macfixer
<http://macfixer.com.au> Mob: 0412 056 033 Ph: 61 3 9893 1677
Geoff WALLACE




_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Ent 2008 Remove text "AUGD: " from Subject (From: Geoff WALLACE <email@hidden>)

  • Prev by Date: Re: Ent 2008 Remove text "AUGD: " from Subject
  • Next by Date: Re: Calling a C Subroutine
  • Previous by thread: Re: Ent 2008 Remove text "AUGD: " from Subject
  • Next by thread: Using AppleScript in Matlab to read/write to Excel 2004
  • Index(es):
    • Date
    • Thread