Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

New Mathematica menu: New Package

  • To: mathgroup at
  • Subject: [mg56899] New Mathematica menu: New Package
  • From: Zhengji Li < at>
  • Date: Mon, 9 May 2005 01:46:44 -0400 (EDT)
  • Reply-to: Zhengji Li < at>
  • Sender: owner-wri-mathgroup at

Dear all,
    It seems to be very difficult to create/save a package file from
the menu of mathematica. But mathematica's main menu is
"programmable", so I would like
to insert a menu item which can create a .m file. Anyone need this ?

   Modify in the directory (on Windows, I do not know what it is on
Mac, etc) $InstallDir\SystemFiles\FrontEnd\TextResources\Windows:

	{       Menu["&New",
	  	    Item["&Notebook", "New", MenuKey["n", Modifiers->{Control}]],
		    Item["&Package", KernelExecute[
		      NotebookWrite[NotebookCreate[WindowTitle -> "Untitled.m"],
                	      Cell["(* Title: *)\n\n(* Author: *)\n\n(*
Content: *)\n\n(* Keywords: *)\n\n(* Version:
		                         ], MenuEvaluator->Automatic
             ..... other File menu items

   The magic here is to "MenuEvaluator->Automatic" to let the kernel
execute the command.

   Best regards.

  • Prev by Date: Re: Simplifying Log to ArcCos Expressions
  • Next by Date: Re: Simplifying Log to ArcCos Expressions
  • Previous by thread: Re: ArcTan[1/0] no result, but ArcTan[Infinity] ok. How to resolve?
  • Next by thread: Re: New Mathematica menu: New Package