Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Manipulating the Front End

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47012] Manipulating the Front End
  • From: JonasB at iui.se
  • Date: Sat, 20 Mar 2004 03:50:24 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Does anyone know where can I find a complete documentation of the FrontEnd
programming features? There is a little in the Mathematica book and in the
online documentation, but it is by no means complete. Too often, like for
example in section 2.11.4 of the manual, you see tables listing:

"A few named commands that can be given to the front end. These commands
usually correspond to menu items." 

But where do I find _all_ the named commands? 

I want to create keyboard macros for things I type often. (There are
palettes, I know, but...) Quite a bit can be learned by simply looking at
the *.tr files, but there is too much guesswork. Editing
DefaultFrontEndInit.tr was simple enough, Esc-si-Esc is replaced by
"//Simplify" if:

	"si"->"//Simplify",

is added to the InputAliases. Since I would prefer to have Ctrl-Alt
combinations than Escaping all the time, I started looking at
KeyEventTranslations.tr. I managed to get "//Simplify" written when I type
Control-h by adding:

	Item[KeyEvent["h", Modifiers -> {Control}], 
		FrontEndExecute[{
			FrontEnd`NotebookWrite[SelectedNotebook[],
"//Simplify"]
		}]],

Unfortunately, I could not get any Ctrl-Alt combination to work by setting
Modifiers -> {Control, Option}. Does anybody have any suggestions?

Jonas

> -----Original Message-----
> From: Omega Consulting [mailto:info at omegaconsultinggroup.com] 
To: mathgroup at smc.vnet.net
> Sent: den 12 februari 2004 13:16
> To: mathgroup at smc.vnet.net
> Subject: [mg47012] [mg46222] Re: [mg45607] Formatting notebooks for 
> Menu File:New?
> 
> 
> At 05:05 AM 1/16/2004, jose flanigan wrote:
> >hi,
> >
> >I put some notebook formatting commands in the autoload init.m. This 
> >formats the initial notebooks when I start Mathematica 5.0 from 
> >scratch. However, it does not format the new notebooks I start by 
> >clicking on File:New.
> >
> >Do you know how I can control the format of the notebooks 
> started with 
> >the File:New menu command?
> >
> >Thanks in advance.
> 
> The actions of the menus are controlled by the MenuSetup.tr 
> file. The file 
> is in SystemFiles/FrontEnd/TextResources or the platform-specific 
> subdirectory. The action associated with each of the menu 
> items can be any 
> frontend command. Change the line:
> 
> Item["&New", "New", MenuKey["n", Modifiers->{Control}]]
> 
> to
> 
> Item["&New", 
> FrontEndExecute[{NotebookCreate[WindowSize->{100,100}]}], 
> MenuKey["n", Modifiers->{Control}]]
> 
> --------------------------------------------------------------
> Omega Consulting
> "The final answer to your Mathematica needs" 
> http://omegaconsultinggroup.com
> 


  • Prev by Date: Re: Why does Mathematica 5.0 fail where Mathematica 4.1 works ?
  • Next by Date: FW: Question on Ordering
  • Previous by thread: RE: Question on Ordering
  • Next by thread: Re: Manipulating the Front End