[texworks] Lua Extension - put into Sentance Case, Trim, Date Time, lowercase, uppercase

Stefan Löffler st.loeffler at gmail.com
Fri Sep 11 08:07:17 CEST 2009


Hi,

On 2009-09-11 02:15, Jonathan Kew wrote:
>> No window, document,
>
> Qt objects such as the document and window are scriptable, actually,
> though we may want to add setters for more properties: for example,
> AFAICT a script can read the window geometry (position, size) but
> cannot change it to arbitrary values, only call specific functions
> such as showMaximized (which works fine from script, I just tried).
> But we can trivially add things like move() and size() to allow a
> script more control (so you could write a custom window-arranging
> script, for example, to configure them to your liking).

You're right about that, of course. I had in mind the corresponding
objects in javascript (as for window.alert() or document.location),
which are web-browser-specific and not available here. But obviously we
can interface QtScript with our Qt objects (for windows, documents, etc.)

However, my personal opinion is that we should not limit ourselves to
this one particular scripting language. I know it's a lot easier to
implement than any other scripting language (mainly because it's built
into Qt), but I for one would prefer the freedom of a generic API with
the possibility to plug in whatever scripting language I need
(personally, I'd prefer python). Anyway, this is a little off-topic here
and we probably should discuss it (and other development propositions)
once TL is released.

>>> It just seems mind blowing what could be achieved. Tap directly into
>>> databases .., well do anything that the server that recives the
>>> request can process.
>>
>> Just one word of caution at the end. This mechanism can be incredibly
>> dangerous. If you execute scripts that you don't trust (and many people
>> seem to do this every day), you open the gates to viruses, hackers and
>> who knows what else. So I'd discourage automatic internet requests from
>> within scripts, and in any case the user has to be informed and has to
>> be able to choose whether or not a particular request should be made.
>
> We'll need to label the package "Handle With Care". :)

Are you sure that would help? How long do people know that emails can
contain viruses and there are still many who open them freely? But then
again, if we don't label it, people _cannot_ know ;).

Stefan


More information about the texworks mailing list