You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to pass command-line-arguments to lua scripts from fityk command line?
I would like to do something like this exec script.lua path\to\my\data or_maybe_some_parameter.
I tried to put inside
localparams= {...}
params[1] -- first parameter, if any.params[2] -- second
or access it via global arg[0] table to no avail.
To add a bit of context here: I started to work with a large datasets on a regular basis and want to automatize part of handwork.
Now my lua scripts contain next lines:
localpath="C:\\Users\\baka\\sobaka\\EXPERIMENTS\\smth\\S3_(ac)\\"-- more codefile=io.open(path.."center.dat", "w")
--more code
and I start the lua script from within a fityk GUI as exec C:\Users\baka\sobaka\EXPERIMENTS\smth\S3_(ac)\script.lua
This approach is not the best one since I have to copy script to each folder and manually change path variable and call script with a full address.
The Idea was to put this script to default fityk folder (C:\Program Files (x86)\Fityk) and pass a path for output as a command line argument as exec script.lua C:\Users\baka\sobaka\EXPERIMENTS\smth\S3_(ac)\.
Is there a way to do it?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
However there is another related problem:
This approach works perfectly with freshly opened Fityk. But as soon as I open saved project I cannot call scripts from default (C:\Program Files (x86)\Fityk) path anymore without providing full path again.
In both cases output of info set cwd is '' type: 'string '
Do you have any ideas why it behaves in such a way and if there is a way fix this?
Is there a way to pass command-line-arguments to lua scripts from fityk command line?
I would like to do something like this
exec script.lua path\to\my\data or_maybe_some_parameter
.I tried to put inside
or access it via global
arg[0]
table to no avail.To add a bit of context here: I started to work with a large datasets on a regular basis and want to automatize part of handwork.
Now my lua scripts contain next lines:
and I start the lua script from within a fityk GUI as
exec C:\Users\baka\sobaka\EXPERIMENTS\smth\S3_(ac)\script.lua
This approach is not the best one since I have to copy script to each folder and manually change path variable and call script with a full address.
The Idea was to put this script to default fityk folder (
C:\Program Files (x86)\Fityk
) and pass a path for output as a command line argument asexec script.lua C:\Users\baka\sobaka\EXPERIMENTS\smth\S3_(ac)\
.Is there a way to do it?
Thanks in advance!
The text was updated successfully, but these errors were encountered: