Questions about the usages of the various initialization files used by Mathematica. The most common ones are the init.m files that can be found in some Mathematica system folders and in a few specific user folders.

learn more… | top users | synonyms (1)

6
votes
2answers
104 views

Where put or edit an init.m to add menu commands?

In this question, answers were given that worked to add items to some menu commands, e.g., additional colors on the Format > Background Color menu, or Help menu items. I have code for such in an ...
1
vote
2answers
58 views

Why can't I import a file in the init.m file?

I would like to have some data read in every time the kernel starts, but it doesn't seem to work. Say I have a CSV file I want to have read in, for example I use: ...
11
votes
1answer
156 views

What is the right place for user-defined init.m?

What is the right folder to put a file init.m which will be run after all other init.m files applied by the various components of Mathematica have done their job? ...
3
votes
1answer
42 views

Where can I permanently modify Directory[]?

First I set SetDirectory["F:\\learning_mma"];Directory[](*ok,success*) and then I quite the kernel: Quit[] an then ...
0
votes
1answer
41 views

Automatically restoring the state of a prior session [duplicate]

I have the following problem (I guess a very naive one): I work with some data and make a statistical analysis in Mathematica. I do it over several days and each time I open the file, I have to go ...
1
vote
0answers
50 views

Best practice to group and have your favorite custom functions available at startup [closed]

The mathematica stackexchange site is a treasure trove of great functions that the user community has shared to make the use of mathematica easier. Many of those functions are very useful for daily ...
2
votes
0answers
44 views

$Failed below input area of new cell in notebook

The Mathematica 9 installation on my laptop has developed an odd feature. Just underneath the grey line indicating the input area for a new cell, the expression ...
5
votes
0answers
121 views

What is the difference between NotebookEvaluate and FrontEndToken

I am wondering what exactly are the differences in using NotebookEvaluate[filename] vs ...
5
votes
0answers
114 views

How to keep $FrontEnd options from resetting?

I'm trying to get Mathematica to look in a different, version-tracked folder for the 'TextResources' files that it uses to build the Front End. I've prepended my version-tracked folder path to the ...
3
votes
1answer
112 views

How to start Mathematica kernel without loading init.m?

Is it possible to start Mathematica kernel from UNIX command line without having the init.m loaded, but not by simply deleting or commenting out it before hand? If this is a Mathematica script, is it ...
3
votes
1answer
121 views

Use URLFetch in init.m

I'm not able to use URLFetch in my $UserBaseDirectory/Kernel/Init.m as it always returns ...
27
votes
3answers
344 views

What bug fixes can be implemented in init.m?

In comments on this question, Mr. Wizard suggested a community wiki to share the bug fixes/workarounds (or possibly other tricks) people load in their init.m. I ...
1
vote
1answer
276 views

Initialization Cells in CDF

I am wanting to run about 15 pages of initialization cells in a CDF, but can't seem to do so. I have set the InitializationCellEvaluation to True and InitializationCellWarning to False, but it doesn't ...
2
votes
0answers
106 views

“LinkOpen::linke : specified file is not a mathlink executable”

The following code runs fine if I run it interactively: ...
7
votes
2answers
182 views

Efficiently initialize list of consecutively named variables for file import

Let's say I have the code: ...
7
votes
2answers
192 views

Evaluate Initialization Cells of another notebook

Although there may be better ways to get data and definitions from another notebook (packages, read/write dumps, ...), sometimes it is convenient to just evaluate the initialization cells from another ...
2
votes
1answer
214 views

Function definitions in init.m don't work

I can't get any function defined in $UserBaseDirectory/Kernel/init.m to work. For example: ...
5
votes
2answers
192 views

How to make DynamicModule work without an extra ENTER

I've been trying to learn more about DynamicModule (I do not use them, as I used Manipulate all the time). After some time ...
3
votes
0answers
72 views

How to search for initialization cells? [duplicate]

Possible Duplicate: How to select all initialization cells? Is there an easy way to search for initialization cells or have all of them removed at once?
9
votes
1answer
182 views

StringMatchQ and Alternatives throws message in init.m

The report of this issue, which itself relates to code of my answer here, exposed a behavior I cannot explain. If I use StringMatchQ in combination with ...
1
vote
1answer
130 views

“Hiding” cells until the first cell is evaluated

This question is based on my earlier question about randomizing labs for students in my computer lab courses. There a perfectly good solution was posted; however, because of privilege problems, I ...
3
votes
1answer
142 views

automatically add Global` to $ContextPath for all notebooks when using CellContext->Notebook

I have some definitions in my init.m. E.g. my init.m contains this: ...
17
votes
1answer
1k views

How often does Mathematica contact its license server?

I know that Mathematica checks the validity of its license every time the program is launched. Say, however, that I have a valid license (which I do) and that I am running some code which takes a ...
1
vote
1answer
201 views

Defining a user defined function in DynamicModule

How can I define a user defined function within DynamicModule? For example, if h[x_] := x^2 I want to find ...
1
vote
1answer
229 views

Not able to load the package in CDF

I am facing a problem in loading the package. My code is working in Mathematica but after deploying it into CDF, it is unable to ...
1
vote
2answers
225 views

Closing front end from within

Based on this I'd like to close the mathematica front end without the nagging dialog boxes that follow. Why am I trying to do this? I have a bash script which is such: ...
9
votes
1answer
644 views

Running an initialization cell on Mathematica start up [duplicate]

I am writing a bash script to run a bunch of Mathematica .nb files serially. So I thought I'd convert my Mathematica cells into ...
0
votes
1answer
205 views

How can I load packages automatically after reopening Mathematica [duplicate]

Possible Duplicate: Automatically load packages at startup I have made two packages "Package1" and "Package2". Package2 calls Package1. it works fine.But everytime I am reopening ...
7
votes
1answer
384 views

Launch a specific notebook automatically when Mathematica starts

I run Mathematica on an iMac running OS X 10.6.8. I have set the OS's "Launch Items" to include Mathematica so that the application opens when the computer boots. Now I want to go further and ...
9
votes
2answers
830 views

Automatically load packages at startup

I'm a physics student and I try to simplify my day with Mathematica. Every time I use Mathematica I need Div[], Grad[], ...
3
votes
1answer
270 views

Using header files

I have a piece of code I keep using in new notebooks over and over again and I have to copy and paste it in each new notebook. Problem arises: if I update the code in one file I have to manually do ...
9
votes
2answers
972 views

How do I automatically evaluate a cell when a notebook is opened?

I'm trying to put together a GUI in Mathematica and need to evaluate one cell to kick that off. Is there a way to automatically evaluate that cell when the notebook is opened? Here is an example of ...
8
votes
2answers
293 views

What is modifying an init.m that changes menu Palettes order?

When I installed the mathStatica application, it seems to have made some kind of change deep in my Mathematica 8.0.4 system files. That change causes the mathStatica palette to appear out of ...