Questions tagged [automation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
55
votes
4answers
3k views

Automatic e-mail/text message when a calculation has finished?

Sometimes Mathematica takes quite a while to finish calculations and it would be convenient to be able to move away from the computer while it is working. I was wondering if there is any "clever" hack ...
44
votes
1answer
3k views

Web Browsing Automation with Mathematica

I want to build a bot to automate web browsing, this mean something like: filling forms press "submit" buttons find certain text inside pages and so on... How can I do this with Mathematica? The <...
22
votes
2answers
783 views

Restarting Mathematica automatically

I run a large computation in a loop. At each cycle of the loop I produce large arrays that I save on a disk. At each cycle I would like to Quit Mathematica and ...
15
votes
2answers
971 views

How to automate generation of image files?

I need to generate a large number of figures as PNG files, and I'm trying to decide whether Mathematica would be the quickest way to do this. All the figures have the same basic structure, and I'm ...
13
votes
1answer
360 views

How to automatically do a computation, Quit[], restart and do a new computation

Related questions have been asked before (eg Where does a package have to be loaded?, https://stackoverflow.com/questions/6152023/quit-kernel-in-mathematica-by-a-command-not-using-evaluation-menu, ...
12
votes
3answers
592 views

Seeking strategies to deploy a function securely without a front end

Background I have a fuction, which calculates an analytic solution to a multi-dimentional geometry problem. The function takes a list of real numbers (typically less than a dozen) and outputs a ...
11
votes
2answers
426 views

Is it possible to create Evaluatable cell which will be automatically overwritten?

Am trying to generate an Evaluatable cell which itself is an output cell which will be overwritten when the original Input cell ...
10
votes
3answers
960 views

Programmatically quitting the FrontEnd or running without one?

I have a conundrum. I use an iMac's OS X 10.6.8 settings to start and stop the machine at the specific times that I need a particular notebook to run. I've done this because it has worked more ...
7
votes
2answers
368 views

Web Browsing Automation: how to expand all comments under a blog post?

I wish to expand all the comments under a LiveJournal post for the purposes of saving the complete thread of comments. According to LiveJournal's FAQ when a post gets more than 50 comments they are ...
6
votes
3answers
715 views

Graph Coloring based on neighboring vertices? Cellular Automata

I would like to apply a majority rule cellular automata to graphs. Specifically, I would like to take a graph as input, and then define two functions, InitialColoring[graph] and MajorityRule[graph]. ...
6
votes
1answer
3k views

Automatically dealing with “disable dynamic updating”

I'm programmatically creating notebooks containing dynamic content. When a new notebook is being created, a window pops up: I then manually click on "Continue" and it will create the notebook. The ...
6
votes
2answers
302 views

UseFrontEnd is not working the same in version 10.4

I'm using batch files to run Mathematica notebooks (with saved output) but in version 10.4 the functionality has changed. Any ideas how to get it working? I use a batch file to run a .m script which ...
6
votes
2answers
213 views

How can I terminate a MathKernel that is running an external program after a timeout?

I'm using ParrallelDo to parallel run another program (windows executable) in 8 subkernels. Sometimes a SubKernel freezes. What I see in the task-manager is that ...
5
votes
1answer
1k views

Wolfram language from batch or py

I would like to automate the commands in this website into a batch file, so when the batch file it runs these commands in sequence. http://community.wolfram.com/groups/-/m/t/157461 Do any of you have ...
5
votes
1answer
123 views

Drawing finite-state automata without using VertexRenderingFunction

In the tutorial entitled "Hierarchical Drawing of Directed Graphs" in Mathematica 12, there is an example of how to draw a graph with several properties I want, but it uses an option called ...
5
votes
2answers
312 views

Automatically detect largest interval over which NDSolve can find a solution

Question: Consider the following numerical resolution: NDSolve[eqn, {x1[t], x2[t], y[t]}, {t, tmin, tmax} where eqn, ...
5
votes
1answer
330 views

How to make a parallel auto-generated .wl package from a .nb notebook

As we know, owing to the set of SetOptions[InputNotebook[], AutoGeneratedPackage -> Automatic], a .m file will be generated automatically by the Mathematica ...
4
votes
1answer
1k views

how to plot the dispersion curve in first brillouin zone?

Those who know some solid state physics should know what the first brillouin zone is. How do I plot the dispersion relation in the 1st brillouin zone so that the curves can 'fold back'? For instance ...
4
votes
1answer
135 views

Use of the option EvaluationElements

When trying to answer this question, I ran into the following problem. In the help documentation of EvaluationElements, it is claimed that we can use EvaluateNotebook to evaluate only cells that have ...
3
votes
1answer
307 views

Welcome screen (V9): selecting notebook from Open Recent … results in initialization cells not evaluating

The following represents an abbreviated example of more complicated code, but it replicates a problem the more complicated code encounters. ...
3
votes
0answers
249 views

Is there a way to profile Mathematica code in batch mode?

I'd like to profile some Mathematica code to figure out why it's running slowly. Since the code takes about a day to run, I can't use the Wolfram Workbench GUI. Is there a way to run Wolfram Workbench ...
2
votes
3answers
357 views

Map several functions in one routine

I have several functions, let's assume they are: func1[x_]=x; func2[x_]=3*x-5; func3[x_]=0.1*x^2; and a lot more like these. For each and every one of these I ...
2
votes
1answer
209 views

Naming Excel Sheets automatically

After performing some calculations with excel sheets I end with a tridimensional matrix a to be export to a .xlsx format and a vector q that contains the name of all the sheets (so $Length[q] = Length[...
2
votes
1answer
148 views

Generating continuous products or sum

This is kind of a continuation of this question. I want to automate these 2 steps on Mathematica once I give an integer $N$. generate a list of variables $\{a_i\}_{i=1}^{i=N}$ then for some ...
2
votes
1answer
60 views

Define Macros to automatically change keyboard input

When using Solve for example, I find myself having to use it in conjunction with other types of functions, like Flatten or ...
2
votes
2answers
727 views

How to get a audio file's duration time in Mathematica?

I have a *.avi file and if I want to know the file's duration time: I can use this code to get the result: Import["test.avi", "Duration"] or the code to get the ...
2
votes
1answer
47 views

How can I get Manipulate[] graphics to print when batch printing notebooks?

I want to print Manipulate[] graphics while batch printing several notebooks. Here's the long version: I have several Manipulate[] graphics cells in my notebooks. The only way I know of to get the ...
2
votes
1answer
72 views

How generalizes (automate) recursive code

This is a small version of my code (for n=2): ...
2
votes
1answer
195 views

How to omit the authentification dialog during URLRead?

When I use URLRead Mathematica will popup a window like: Actually I have given the parameters Password and ...
2
votes
1answer
144 views

Randomizing a lab

I teach a class where students do a weekly lab in Mathematica. They do it in a computer lab, and because there are many of them, and only one of me, I encourage them to help one another. ...
2
votes
1answer
55 views

Issue with NotebookPrint to export multiple notebooks to PDF in Mathematica 11.1

I have a number of lecture notebooks that I publish to Dropbox in PDF format. It's been working great for years, but something seems to have gone wrong in the latest version of Mathematica. My code ...
2
votes
0answers
54 views

What could cause an “Uncaught Throw[$Failed,CURLLink`Utilities`Exception] returned to top level.” error message?

I am running a program in Mathematica that uses web browser automation, and is also connected to my email account. The program runs fine for a while, but after a few hours, I end up getting the ...
2
votes
0answers
28 views

Unexpected symbol::shdw warning during NotebookEvaluate

Consider the following code: ...
2
votes
0answers
57 views

How to stop autosaving? [closed]

Is there a notebook autosave frequency configuration? I made my MMA file to autosave, it was nice for a little bit. However, now it automatically saves every 10 seconds, and try to save every time I ...
1
vote
1answer
79 views

Is there a way to automate this procedure?

I have some code which numerically solves a differential equation for a given value of the parameter $M0$ and for some initial conditions. The initial conditions will remain fixed throughout the ...
1
vote
1answer
83 views

Automatic variable naming

I am trying to construct a complicated code in which I need to name a lot of variables and their definitions. For Example: The problem is as follow: Once I insert new variable in between two, I ...
1
vote
2answers
29 views

Place Holder or Suppressing Re-ordering

Using the for loop how can I print: file0.jpg file1.jpg file2.jpg file3.jpg file4.jpg file5.jpg file6.jpg file7.jpg file8.jpg file9.jpg The closest code I came ...
1
vote
1answer
157 views

Automatically assign solutions to equation as constants

Consider the following code: ...
1
vote
2answers
126 views

Creating authomatically inequalities/equations from a list of polynomials

I am trying to learn how to make automatically from a list of polynomials (or an arbitrary collection of algebraic expression) a list of inequalities/equalities (those will later serve as constraints ...
1
vote
1answer
87 views

How to obtain differential consequences of linear transport equation automatically?

Motivation Here I've asked how to derive coefficients of numerical approximation of the linear transport equation $$ u_t + u_x = 0, \tag{1} $$ on a fixed 3-point stencil automatically and here I've ...
1
vote
0answers
43 views

Quantum Dot Absorbance Data Peakfinding

I work in a lab making quantum dots, and was recently tasked with finding a way to extract some figures of merit from old data in an automated way. In particular, I'm looking to extract the peak ...
1
vote
0answers
34 views

NotebookEvaluate within cell with CellContext->Notebook

I've encountered the following issue with NotebookEvaluate (note the grouping into 3 distinct cells): ...
1
vote
0answers
69 views

Evaluate .nb automatically and sequentially using external file as input

I am interested in implemented the following workflow. I have a Mathematica script that receives an input (manually), executes the algorithm based on that input, and stores output into a CSV file. ...
1
vote
0answers
95 views

Automate Windows From Mathematica

Is there a feasible way to automate Windows from Mathematica? I'm thinking maybe with the .NETLink? If not maybe just mouse movements or keyborad shortcuts ? This might be a good start https://msdn....
1
vote
0answers
399 views

How to derive finite-difference scheme automatically on a quite general stencil

Info This question is a generalization of the following one Derivation of numerical scheme for linear transport equation on a variable stencil. Statement of a problem Linear scalar hyperbolic (...
1
vote
1answer
267 views

Auto Execute Notebook on Open [duplicate]

How might I automatically execute a notebook script on open? For example I would like to a notebook to automatically execute it's cells.
0
votes
2answers
147 views

Modifying codes in a more 'Mathematica' way

I have the following codes: ...
0
votes
2answers
8k views

KeyPress function in Java's Robot class, how to state parameter?

I am trying to use Java's Robot class to type. This is what I have done so far. Needs["JLink`"]; InstallJava[]; robot = JavaNew["java.awt.Robot"] The mouseMove ...
0
votes
2answers
129 views

Automatic process to replace missing values, coming from a second matrix

I have a large starting matrix with missing values in different columns. I want to replace this missing data as follow. First I have to check the group (last column in starting matrix) and go to a ...
0
votes
1answer
54 views

Automatic indentation of text and equations depending on Style

I have a rule when writing text and equations. Starting from the Section environment, each text/equation that sits inside Section...