Re: Notebook that auto-executes when opened?
- To: mathgroup at smc.vnet.net
- Subject: [mg97286] Re: Notebook that auto-executes when opened?
- From: AES <siegman at stanford.edu>
- Date: Tue, 10 Mar 2009 05:33:48 -0500 (EST)
- Organization: Stanford University
- References: <gp2bgq$911$1@smc.vnet.net> <gp2qf0$d07$1@smc.vnet.net>
AES wrote:
> Is it possible to set an option for a notebook such that it automatically
> begins executing when opened? -- that is, when the nb icon is dbl-clicked?
and Jens-Peer Kuska <kuska at informatik.uni-leipzig.de> replied:
> no, it would be the first Mathematica written virus
>
> My favorite command would be
>
> DeleteFile/@ FileNames["*.*", {"C:\\"}, 4]
Interesting point, and one I'd certainly not thought of -- although I
was asking about creating this capability in notebooks that I'd write
myself, for myself, not ones to be distributed to others.
And in any case, if you were malevolent in this fashion, could you not
fairly easily hide your favorite command within a closed but still
executable cell within some large and apparently benevolent nb, which
you might then make available to other people for them to use in doing
some apparently useful task?
Or perhaps bury it in a Mathematica package, or demonstration, or ???
that was then called and executed by this benevolent program? (I'm not
skilled enough in the complexities of Mathematica to know just what can
and can't be included in structures other than notebooks.)
Related thought: Should Mathematica perhaps have an option or
preference (which is normally set to ON by default) under which your
favorite command, and others like it, would always trigger an "_Are you
sure_ you want to do this?" dialog before executing? Seems to me many
of the other apps I use have some capability like this, for protection
against accident as much as malevolence.
- Follow-Ups:
- Re: Re: Notebook that auto-executes when opened?
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Re: Notebook that auto-executes when opened?