MathGroup Archive 2003

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

Search the Archive

RE: "Autoload in AddOns" doesn't load?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38786] RE: [mg38766] "Autoload in AddOns" doesn't load?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 12 Jan 2003 06:17:14 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Borut,

This is what I do. I have a notebook, init.nb, that I place DIRECTLY in
AddOns/Autoload. I put all the initialization statements I want in that
notebook, making the cells initialization cells. When I save the notebook I
choose "Create Autosave Package". Then those statements will be evaluated
whenever you load Mathematica.

I don't think it works if you have intermediate directories.

If you use DrawGraphics, then the "A" button on the DrawGraphics palette
will paste in the commands that close up and start the animation. I have
recently updated the palette so that they paste a more general and robust
form:

SelectionMove[EvaluationNotebook[], All, GeneratedCell]
FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.01];
FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1,
      AnimationDirection -> Forward]}]

The Pause statement assures that the graphic cells are closed before the
animation starts, otherwise this is erratic. But, because of some feature of
Mathematica it always pauses for 1 second.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: Borut L [mailto:gollum at email.si]
To: mathgroup at smc.vnet.net


Helo, I have a bit of a problem with auto-loading my code.

I've put a directory MyProcedures in Mathematica/4.2/AddOns/Autoload
directory, and into it a file Quickie.m and a directory Kernel with a
decleration file init.m. Now, in file Quickie a function MakeAGif is
declared, which works ok when starting Mathematica.

MakeAGif[name_String, dir_String, src_] :=
    (
      SetDirectory[dir];
      Export[name, src, "GIF",
          ConversionOptions -> {
              "Transparency" -> RGBColor[1, 1, 1],
              "Disposal" -> Background,
              "Loop" -> True}
          ] // Timing
      );

There is also a variable animeClosePlay declared, which should be used
'post-ani', ie "animation generator" // animeClosePlay, but this does not
work!

animeClosePlay:=
(
  SelectionMove[EvaluationNotebook[], All, GeneratedCell];
  FrontEndTokenExecute["OpenCloseGroup"];
  FrontEndTokenExecute["SelectionAnimate"];
 )


I guess my understanding of what is acctually happening here, lacks
something.

Help me please.


Borut Levart
Slovenia





  • Prev by Date: Re:MacOS X front end patch available
  • Next by Date: Re: Numerical description of a contour
  • Previous by thread: "Autoload in AddOns" doesn't load?
  • Next by thread: Re: "Autoload in AddOns" doesn't load?