[OS X TeX] Re: Flashmode-Alpha Trial version

Joachim Kock jkock at start.no
Wed Jan 5 11:55:37 CET 2005


> A trial version of Flashmode-Alpha, for the combination
> AlphaX/TeXniscope, can be downloaded from
> http://www.math.uni-heidelberg.de/studinfo/gerhardt/tex/

Hello Claus,

thank you for conducting these interesting experiments.  I think we are
many that are excited about these developments.  It is admirable that you
make an effort to make this work in Alpha too, although it seems that you
don't know much about Alpha.

> Please, read the instructions!

Yes, that is always good advice.  It goes for Alpha too!  :-)

> The developers of AlphaX obviously never thought that AlphaX itsself
> might be the target of Applescripts.

(Wir sind gewohnt das die Mennschen verhöhnen was sie nicht verstehen.)

> Alpha's Applescript dictionary contains only a minimal amount of classes
> and commands; fortunately, it understands the 'save' command, which is
> infinitely more than Emacs' knowledge of Applescript commands, and enough
> for producing a working version of Flashmode.

In addition to a couple of required classes and commands, Alpha sports
only one applescript command (quite a minimal set, indeed):

    DoScript

This command allows for the execution of *any* Tcl script or command.
Hence *every* existing or imaginable command in Alpha, including all menu
items, keystrokes, event hooks, advanced searches and filter actions,
preference settings, can be executed via an applescript.  This makes Alpha
one of the most scriptable of all applications, and this design is
extremely flexible and powerful.  No need to update a dictionary each time
a command is added; user-defined Alpha commands are immediately callable
through AppleScripts too.  I think the developers *did* design Alpha to be
a target for AppleScripts!


> It would be more satisfactory, if the following Applescript commands
> (and properties) could be implemented in AlphaX (considered only as
> target)

I don't think it would be more satisfactory to reinvent the wheel like
this for every scripting language.  Alpha is written in Tcl and every
Tcl command can be executed directly.  What do you need more?


> 1. get path of front document --unix path

simply do

    DoScript "win::Current"


> 2. if document texName is modified then

simply do

    DoScript "win::getInfo texName dirty"

this will return 1 or 0 (for true or false).


If you want to avoid applescripts altogether (but I don't think you would,
since you are an expert in Applescript), you can also do all this over a
socket.  This is perhaps the preferred way for unix applications to 
communicate with Alpha.  

Finally there is the obvious alternative of writing the whole flash
mechanism in pure Tcl and do everything entirely from within Alpha.  I did
some naive experiments with this a long time ago, but decided that I would
rather wait until I upgrade to something faster than my current iBook
500MHz.  But perhaps time is ripe to take up the challenge again...


Thanks again for your work.  If you have further questions or doubts,
don't hesitate to ask.

Cheers,
Joachim.


----------------------------------------------------------------
Joachim Kock <kock at mat.uab.es>
Departament de Matemàtiques -- Universitat Autònoma de Barcelona
Edifici C -- 08193 Bellaterra (Barcelona) -- ESPANYA
Phone: +34 93 581 32 50        Fax: +34 93 581 27 90
----------------------------------------------------------------


------------------------------------------------------------
Få din egen @start.no-adresse gratis på http://www.start.no/
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list