<div>Thank you very much  for sharing that.</div>
<div> </div>
<div>JavaScript sounds really great!!</div>
<div> </div>
<div>Paul<br><br></div>
<div class="gmail_quote">2009/9/7 Jonathan Kew <span dir="ltr">&lt;<a href="mailto:jfkthame@googlemail.com">jfkthame@googlemail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Just a quick note for now: yes, once the TL&#39;09 release is out, scripting is one of the first new features I want to include in the development trunk.<br>
<br>Don&#39;t assume, though, that the [first] scripting language will necessarily be Lua. Although Lua certainly seems to be on the rise in the TeX world, another very widely-known language is JavaScript, and it happens that Qt includes a lot of support for this right in the application frameworks. By using this, we can get a huge amount of functionality &quot;for free&quot;, without the need to write (and maintain) extra code to interface the scripting language to the application&#39;s built-in objects and functions. So I think it makes sense to try this first, and then consider whether any additional language(s) may be needed.<br>
<br>I have an experimental version with JavaScript support (based on Stefan&#39;s Lua patch, but much simpler because it doesn&#39;t have to provide the Lua interpreter or the &quot;glue&quot; code) that I will make available after we branch the stable TL release (shortly).<br>
<br>And yes, the ability to have sub-menus (and shortcuts) for scripts, and easily modify them, is certainly desirable.<br><br>JK 
<div>
<div></div>
<div class="h5"><br><br>On 7 Sep 2009, at 00:46, Paul A Norman wrote:<br><br></div></div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div class="h5">Dear Steffan,<br><br>Thanks for that.<br><br>I come from more a Delphi (Turbo Pascal) background so please excuse anything I say as not working from a purely C workspace.<br><br>The incorporation of a scripting language is a stroke of genius, so many distributed editors do not do that or in Win32/64 were in the past just plugging VBA in.<br>
<br>PHP<br><br>In Delphi we can extend an application&#39;s functionality using a PHP extension which opens up all the libraries and code of PHP (<a href="http://users.telenet.be/ws36637/php4delphi.html" target="_blank">http://users.telenet.be/ws36637/php4delphi.html</a>) this plugs into the PHP Zend C API - you can think what I am going to ask here, can TW being a C written application better do this as well as LUA? Or could LUA be asked to handle this for TW - its just that there is such a wealth of string libraries and other  platform independant libaries already available under PHP.<br>
<br>Dynamic Menu / Sub-Menu Items<br>I think I suggested privately to Alain (again form my Delphi background) that the Scripts (LUA) names be utilised to show where they should go on the Scripts menu.<br><br>I was thinking that the Scripts will be more important than many realise at first, in that they will provide a lot of stringhandling utilities and placement of custom tags (custom LaTeX commands), so they will probably increase in number for many users very quickly.<br>
<br>This made me think from previous experiences that the Script menu would become cumbersome and over full,  very quickly.<br><br>As (in Delphi) I am used to being able to make new sub-menus and menu items dynamiacally at run time, I wondered whether this was possible in TW as well?<br>
<br>Thinking perhaps that the LUA script name could place it on the menu tree and call for the making of new sub-menu(s) as needed.<br>I.e. lua script name:  Insert-LaTeX_Pictures_Righthand-Logos.lua<br><br>- for space<br>
 _ for new Sub menu<br><br>Would go on Menu     Scripts/Insert LateX/Pictures/Righthand Logos<br><br>Or perhaps it could be a property of the script  in the Script Management tool, plcaement on which (sub)(sub)Menu?<br><br>
It would be a great help to us users!<br><br>Paul<br><br>2009/9/6 Stefan Löffler &lt;<a href="mailto:st.loeffler@gmail.com" target="_blank">st.loeffler@gmail.com</a>&gt;<br><br>Hi,<br><br>On 2009-09-02 11:44, GMAIL wrote:<br>
&gt;<br>&gt; message from TeXworks user<br>&gt;<br>&gt; I am very new to Lua as no doubt the following will confirm, but I<br>&gt; have been able to hobble this together from the Tutorials and chm help<br>&gt; and other Lua Wiki resources.<br>
&gt;<br>&gt; Share it in case it inspires any one else...<br>&gt;<br><br>Thanks for putting the time into this and for sharing. I haven&#39;t tested<br>it intensively, but the first impression is great. It&#39;s good to see<br>
people testing the new (experimental) features of TeXworks.<br><br>&gt; (Also wondering, does TW object expose any more properties or methods<br>&gt; please?<br>&gt;<br><br>Yes, that&#39;s definitely planned. So far, the Lua implementation is very<br>
experimental and basically just a prove of concept. After the first<br>official release, we&#39;ll brainstorm new development plans for Tw, and Lua<br>will certainly be in there. Then we&#39;ll probably also be drafting a<br>
reasonable API with more properties, methods, etc. so that it gets<br>really usable. The methods provided so far are only quick hacks to show<br>that it can be done (as you proved with your scripts ;)).<br><br>Stefan<br><br>
</div></div>&lt;user_Lua_Menu.png&gt;<br></blockquote><br></blockquote></div><br>