• 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: adding button to toobar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding button to toobar


  • Subject: Re: adding button to toobar
  • From: julifos <email@hidden>
  • Date: Mon, 02 Jun 2003 20:44:49 +0200

> I'm very new to this and have a 2 pronged question.
>
> We have lots of clients using Mail as their email client and for some
> reason lots of them seem to get stuck in offline mode and can't figure
> out how to get out of it. Of course we can tell them how, but I noticed
> that there is a toolbar button "Go Online" and if that was in their
> tool bar, it might make my life easier.
>
> We are working pre-configuring some machines for users and I would like
> to add adding this button to our mail setup script.
> I'm not sure of the syntax for adding this. I see that there is a
> section in the plist NSToolbar Configuration MessageView and I see that
> I want to add a TB Item Identifier, but .... from there I'm stuck.
>
> So, my questions are:
> Anyone know what the syntax is for adding a TB Item Identifier in Mail?
> Where should I go to find this kind of info?
>
> Thanks in advance for any advice you may have to offer.

You can try this (rewrite to fit your needs):

########################################
--> Quit Mail.

set x to (do shell script "defaults read com.apple.mail 'NSToolbar
Configuration MessageViewer'")

--> If "connectAllAccounts", place it in first place of toolbar:
if (offset of "connectAllAccounts" in x) = 0 then --> go ahead
set x to my searchReplace(" \"TB Item Identifiers\" = (" & return, "
\"TB Item Identifiers\" = (" & return & " \"connectAllAccounts:\", "
& return, x)
do shell script "defaults write com.apple.mail 'NSToolbar Configuration
MessageViewer' " & quoted form of x
end if
return x

to searchReplace(lookFor, replaceWith, theText)
set AppleScript's text item delimiters to lookFor
set theText to theText's text items
set AppleScript's text item delimiters to replaceWith
set theText to "" & theText
set AppleScript's text item delimiters to {""}
return theText
end searchReplace
########################################

JJ
_______________________________________________
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.

  • Prev by Date: Re: Error -1762
  • Next by Date: Finder Print Properties record
  • Previous by thread: adding button to toobar
  • Next by thread: Eudora boring header automation
  • Index(es):
    • Date
    • Thread