# Newbie question on a Mathematica script

**URL:** <https://community.wolfram.com/t/newbie-question-on-a-mathematica-script/1824>\
**Category:** Questions\
**Tags:** mathematica\
**Created:** [March 28, 2014, 3:59pm UTC](https://community.wolfram.com/t/newbie-question-on-a-mathematica-script/1824 "2014-03-28T15:59:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yajnaval](https://avatars.discourse-cdn.com/v4/letter/y/8edcca/32.png) [@yajnaval](https://community.wolfram.com/u/yajnaval)\
**Post date:** [March 28, 2014, 3:59pm UTC](https://community.wolfram.com/t/newbie-question-on-a-mathematica-script/1824/1 "2014-03-28T15:59:17Z")

</div>

Appreciate tips on how write a Mathematica script that would

1. Wait for user input, that contains a long string which includes blank spaces, i.e. no commas etc.
2. Do an integral over a predefined variable using input from Step 1.
3. Use input from Step 2 above to do another integral over a predefined variable.
4. Continue steps like 3, till the end. 5. Output written to both screen and a file that contains the name of the input.

Please note that the integrals are over DiracDeltas, and cannot be done as multiple integrals in one shot, it has to go step by step.

---

<div class="post-metadata">

**Author:** ![seanc](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/seanc/32/34005_2.png) [@seanc](https://community.wolfram.com/u/seanc)\
**Post date:** [March 31, 2014, 4:36pm UTC](https://community.wolfram.com/t/newbie-question-on-a-mathematica-script/1824/2 "2014-03-31T16:36:10Z")

</div>

A “Mathematica script” means something specific. Are you looking to write a program that runs in Mathematica or externally?

1. See the documntation for Manipulate on how to make simple user interfaces. You can make user interfaces that take an inputfield. For example:

```auto
Manipulate[Plot[f[x], {x, 0, 10}], {f, Tan}]

```

1. For example:

```auto
Manipulate[Integrate[x y, b], {b, x}]

```

1. This really wouldn’t be much more of an addition to the previous example. Maybe it could be something like:

```auto
Manipulate[With[{firstResult = Integrate[x y, b]},
  Integrate[firstResult, z]
  ], 
{b, x}]

```

1. You can use Export to export something to a file as a specific file format. In this case, you’ll probably want a button that causes an export to happen. See this example from the documentation in Manipulate on how you can make a button:

```auto
Manipulate[x, {{x, 0}, Button["random", x = RandomReal[]] &}]

```
