Hi,
I had a first good look at the Lua scripting yesterday and made some notes whilst doing so :
-
If you run a Lua script on a protein with some segments frozen, foldit crashes. There needs to be an unfreeze_all() command of some sort to allow adjustments of the structure on which the Lue script will be working, since the command 'restore_abs_best()' also has the potential to load in a frozen protein.
-
Canceling a script can cause foldit to crash
-
It would be much more useful in the do_local_rebuild() function if 1 iteration was defined as 1 rebuild, and not some arbitrary number. ie If I request 'do_local_rebuild(1)' it stops when it comes across the first rebuilt section.
-
You cannot get braces {} to appear in the script on a German keyboard. The key combination is AltGr+7 and AltGr+8 for the respective brackets.
-
The 'save' icon does not light up when writing a new script. To save the script you have to "set details" every time to make the 'save' work properly.
-
If you save a script, then ammend it, then try to reload the same script (which should be without the ammendments) it does not work - you are left with the ammended script.
-
Cntr Z (delete last) is a vital tool and is missing from the interface
-
A copy and paste functionality would be very useful. At present you can paste (Cntr V) but cannot highlight sections of text and copy them (Cntr C).
-
In the help facility it would be much more legible if the function names were in one colour and the description in another
Rgds
Steve B
Well, that´s an impressive summary! I´m with you.
Frozen Proteins lead to a lua crash? Ooops, good that I didn´t try it :)
Getting the "selected"- status of a single segment or "locked"-status of backbone and sidechain would fix this, so you could skip a frozen segment and only execute selected parts of the game interface.
I tried a workaround for the keyboard problem by changig language to English in the language bar (In german called Eingabegebietsschemaleiste, what a word!), which activates english keyboard behaviour, giving edged brackets by pressing ü and + and braces by pressing SHIFT-ü and SHIFT-+ but only in windows and its programs ;(
Now, I´ve got a workaround!
If you want brackets or braces in the script, write some word into the script which is never used everywhere else, like um… "rhubarb", for example.
Words like "test", "wiggle" or something like this would not be unique.
Close Foldit.
Then, search in C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\foldit (or wherever windows stores this file) the file "all.macro" and open it with the text-editor.
Search for "rhubarb" and exchange it to your needs. Insert []{} etc.
If you are done, save the file over.
I recommend you to make a copy of all.marco before and to save the script under another name just after restarting foldit.
all.marco? I meant all.macro
Sorry.
CTRl-V works also for special symbols, I didn´t know that! feels ashamed
You can make the SAVE-button (for overwriting recipes) appear again, if you open the recipe-info-box and close it again.
Maybe, the game is programmed this way that a "change in the script-code" is only noticed if you also change the info.
I'm re-assigning it, so the problems will be noticed.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.