Can a script on the recipes run external commands?

Started by ThiagoM

ThiagoM Lv 1

I'm wondering if I can make a script call an external software. Example

1)Foldit script output on the external software the atoms position
2)The external software return the new position.
3)Foldit update the shape to the new position

The reason is that in that way I would be able to improve the recipe using other languages that could be connected with databases.

thanks a lot

brgreening Lv 1

here is a link to documentation about Lua commands:

https://fold.it/portal/node/996467

you can look there to see what a Lua scripts can do

the Foldit people seem to have left out commands to (a) open a named file, (b) read data from an opened file.

outside of Foldit, you might be able to read the external data base, get the data, create a Lua file with the data, and then run it in Foldit.

ThiagoM Lv 1

I was looking more deep in the forum and I found some replies regarding this, and unfortunately seems that they don't want this to happen. I guess they want to keep as game after all.

jeff101 Lv 1

You can read named files by copying and pasting their text into a LUA Textbox
and then parsing the results inside a LUA Recipe. See below for details:
http://foldit.wikia.com/wiki/Foldit_Lua_Function_dialog.Show
http://foldit.wikia.com/wiki/Foldit_Lua_Function_dialog.AddTextbox
http://foldit.wikia.com/wiki/Foldit_Lua_Functions

You can also create output files by controlling what Foldit Recipes print to the Recipe Output.
All of this Recipe Output appears in a file called scriptlog.default.xml on Windows machines.

With enough LUA coding, you can probably set up the
input and output files to be compatible with your external program.