[OS X TeX] Applescript-tcl dictionary, wishlist
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Fri Jan 7 09:41:53 EST 2005
Though I wouldn't consider myself to be a guru of any kind, here are
BBEdit's Applescript commands (numbered from 1 to 6):
1. set sourceLine to startDisplayLine of selection as number --don't
worry about selection
2. do shell script "bbedit " & "+" & theLine & " " & fileName
3.replace findText using replaceString searching in text 1 of text
window 1 options {search mode:literal, starting at top:true, wrap
around:false, backwards:false, case sensitive:false, match words:false,
extend selection:false}
4. is given
5. set the selection to "string"
6. set theSelection to selection as text
On the other hand, tcl scripting is very powerful and I believe that
there are commands in tcl that have no equivalent in Applescript, but
still can be initiated from Applescript by using the construct
DoScript, which is similar to "do shell script". Since I don't think
that would refrain from using shell scripts (within Applescripts)
simply because they belong to a different language, I would strongly
suggest that a more or less extensive (Applescript)-tcl dictionary
exists so that people fluent in Applescript but illiterate in tcl can
use.
This is not a reinvention of the wheel, but on the contrary simply the
use of existing powerful tools.
The more complex tcl commands or suites of tcl commands could be
gathered as Applescript subroutines, if necessary, that would be easily
available for those, who are neither experts in Applescript or tcl.
Claus
On Jan 7, 2005, at 8:17, Jérôme Laurens wrote:
>
> Le 6 janv. 05, à 18:17, Claus Gerhardt a écrit :
>
>> Let me suggest some commands that should be part of an
>> Applescript-tcl dictionary, especially having tex files in mind:
>>
>> - get line -- get the number of the line, where the insertion point is
>> - goto line lineNumber of fileName (or of the front window)
>> - find and replace all -- the option for *all* in the find replace
>> command
>> - a detailed description of find and replace with grep
>> - keystroke "string" -- type the string at the current insertion point
>> - set theSelection to selection --selection means highlighted text
>>
>>
>
> As this list of suggestions is not TeX nor tcl specific, let me feel
> free to make a suggestion.
>
> AppleScript implementation and user interface being separated,
> I would suggest not to reinvent the wheel and adopt BBEdit scripting
> interface.
> Please, don't forget that one of applescript primary goals is to stick
> as far as possible to human natural language,
> which makes applescripting a tool for users, not for developers.
>
> If a BBEdit guru could translate the above suggestion into real
> applescripts, that would definitely help users in the end.
>
> --------------------- 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>
>
>
--------------------- 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 MacOSX-TeX
mailing list