• 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: Dismissing Excel 2004 Project Gallery
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dismissing Excel 2004 Project Gallery


  • Subject: Re: Dismissing Excel 2004 Project Gallery
  • From: Nigel Smith <email@hidden>
  • Date: Thu, 27 May 2004 14:44:58 +0100

On 26/5/04 5:58, "David Weiss" <email@hidden> wrote:

> It's too bad this preference isn't stored in a .plist somewhere.

To which I thought "It must be stored *somewhere*..."

I've only got Excel X but, after a bit of roooting around, I've come up with
something that will read and toggle Excel X's startup screen settings,
without needing to launch Excel:

----------
on readXcelProjPrefs()
set myString to read file ("" & (path to preferences) & <break>
"Microsoft:Microsoft Component Preferences")
if (ASCII number of character ((offset of "FNXCEL" in myString)<break>
+ 9) of myString) = 0 then
--dialog will not appear
return false
else
--dialog will appear
return true
end if
end readXcelProjPrefs

on toggleXcelProjPrefs() --returns new setting, 1=on, 0=off
set myString to read file ("" & (path to preferences) & <break>
"Microsoft:Microsoft Component Preferences")
set theOffset to (offset of "FNXCEL" in myString) + 9
if (ASCII number of character theOffset of myString) = 0 then
set theNum to ASCII character 1
else
set theNum to ASCII character 0
end if
set myString to text 1 thru (theOffset - 1) of myString & theNum <break>
& text (theOffset + 1) thru -1 of myString
set fileRef to open for access file ("" & (path to preferences) <break>
& "Microsoft:Microsoft Component Preferences") with <break>
write permission
set eof of fileRef to 0
write myString to fileRef
close access fileRef
return ASCII number of theNum
end toggleXcelProjPrefs
----------

Might interest someone somewhere :-)

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


References: 
 >Re: Dismissing Excel 2004 Project Gallery (From: David Weiss <email@hidden>)

  • Prev by Date: Re: A funny think happened...
  • Next by Date: Re: Process whose frontmost *was* true?
  • Previous by thread: Re: Dismissing Excel 2004 Project Gallery
  • Next by thread: Re:Dismissing Excel 2004 Project Gallery
  • Index(es):
    • Date
    • Thread